News for hackers. Stuff that matters.
Re:Sed – An Introduction and Tutorial by emmelaich on Thursday January 08, 2015 @08:54AM (#8856335)
deleting (i.e) not printing lines Here are the examples for not printing the 4th line:

sed: sed -n '4!p'

awk: awk 'NR != 4'

perl: perl -ne '$. != 4 && print'

Not much between them really.

Re:Sed – An Introduction and Tutorial by scdlbx on Thursday January 08, 2015 @12:34PM (#8857547)
I would consider 'sed 4d' to be significantly easier than doing the same in Perl, but I don't disagree that it's not that hard to do in either.