Link to home
Start Free TrialLog in
Avatar of TIMFOX123
TIMFOX123Flag for United States of America

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

Avatar of point_pleasant
point_pleasant
Flag of United States of America image

tail -n +2 file_name
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TIMFOX123

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 !!!



thank you

it worked

I used sed