I saw the sed examples, but no matter how I write that it won\'t delete my first line. Actually, I did more tests and it won\'t delete my first line either, so
sed
If your sed supports in-place editing, it's sed -e '1d' -e '$d' -i filename.
sed -e '1d' -e '$d' -i filename