Reputation: 47
I am trying to understand the below command. Looked many tutorials and references. Can anyone help What actually it does.
sed -e '$d' -e '1,1d' File1 >File2
Upvotes: 1
Views: 74
Reputation: 2672
$d
wil delete the last line
To delete lines between n
and m
use n,md
. ie. 1,1d
is same as 1d
, which deletes the first line
So sed -e '$d' -e '1,1d' File1 >File2
will remove first and last line from File1
and send to file2
Upvotes: 2