Not sure what exactly you mean by "grepping the 2nd line from a file", could you provide some sample input with expected output?
# prints only the second line of the file perl -ne 'print if $.==2' -- FILENAME # prints only the second line of the file if it matches a pattern perl -ne 'print if $.==2 && /pattern/' -- FILENAME
In reply to Re: Grep the second line from a file?
by Anonymous Monk
in thread Grep the second line from a file?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |