TIMFOX123
asked on
what is the easiest way to "knock off" the just the first line of a file in bash.
I have a data file and I fix the first entry and then delete the entry.
My problem is that I do not really trust sed on solaris boxes. I assume that if it works in solaris, it will work in linux ( ksh & bash ).
what is an easy way to get rid of the first line in a file in solaris ( and should also work in linux and hopefully aix ).
Cross platform is the key
My problem is that I do not really trust sed on solaris boxes. I assume that if it works in solaris, it will work in linux ( ksh & bash ).
what is an easy way to get rid of the first line in a file in solaris ( and should also work in linux and hopefully aix ).
Cross platform is the key
tail -n +2 file_name
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Let me see if I understand this.
If I want to use the cross platform script I need to do someting like this for sed ?
sed "1d" fixes2 > fixes3; cp fixes3 fixes2
Seems messy.
If there is a better way I am all ears !!!
If I want to use the cross platform script I need to do someting like this for sed ?
sed "1d" fixes2 > fixes3; cp fixes3 fixes2
Seems messy.
If there is a better way I am all ears !!!
ASKER
thank you
it worked
I used sed
it worked
I used sed