HEAD=`head -1 myfile.txt` TAIL=`tail -1 myfile.txt` grep -v $HEAD myfile.txt|grep -v $TAIL>myfile.txt~ mv myfile.txt~ myfile.txt
Untested code. Needs some debugging.
In reply to Re: Deleting first and last lines of a text file
by DrHyde
in thread Deleting first and last TWO(2) lines of a text file
by vsmeruga
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |