Hi
I have AIX 5.3
I want schedule a cronjob that can remove first 5000 lines every weekend.
Is anybody know the commmand to remove first 5000 lines from unix file?
Any Help will be Greatly appreciated.
Thanks,
Vishal
Hi
I have AIX 5.3
I want schedule a cronjob that can remove first 5000 lines every weekend.
Is anybody know the commmand to remove first 5000 lines from unix file?
Any Help will be Greatly appreciated.
Thanks,
Vishal
tail -n +5001 file > newfile
How can we do same thing without creating new file? Thanks
You've posted a similar question about 1 year ago:
What kind of problems do you have with the given solutions there?
I apoloize for double submission. I got solution from past thread.
one more solution, to edit the original file itself.
sed -n -i '5001,$p' file