- Use "sed '$d' infile > outfile" to remove the first line.
- Use "sed '1d' infile > outfile" to remove the last line.
$ cat hf.dat head one two three foot $ sed '$d' hf.dat > nofoot $ cat nofoot head one two three $ sed '1d' nofoot > noheadfoot $ cat noheadfoot one two three $
No comments:
Post a Comment