and here's how I would remove the first and last line:perl -i.bak -ne 'print if $. > 1'
perl -i.bak -ne 'print $prev if $. > 2; $prev=$_' test1
In reply to Re: Regex
by Thelonius
in thread Delete the first line of a file ?
by cored
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |