I prefer:
perl -ne'print and close ARGV if $. == 4' file.txt
It works better with multiple files on the command line. ;-)
In reply to Re^3: perl one liner to print a line
by jwkrahn
in thread perl one liner to print a line
by sugar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |