Tuesday, November 2, 2010

delete lines from a file

sed -e '2d' hello.txt # delete line #2 from hello.txt
sed -e '1,36d' hello.txt # delete line 1-36 from hello.txt
awk '!(NR>=1 && NR<=36){print $0}' hello.txt # delete line 1-36 from hello.txt

No comments:

Post a Comment