See perlrun about the -n and -p switches:
perl -wnle "$i++;END{print $i}" in.fi
... or
perl -wnle "END{print $.}" in.fi
... or just wc -l in.fi.
In reply to Re: one liner - open file and read
by Corion
in thread one liner - open file and read
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |