in reply to process file via command line
Or, if you want to print the result after every line:cat access.log | perl -ne '#stuff#'
The -n switch puts the while (<>) loop around your input file for you: see perlrun.cat access.log | perl -nep '#stuff#'
And, to really spoil you for choice, Perl is smart enough to decide where its input is coming from, so you can do this as well:
perl -ne '#stuff#' access.log
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: process file via command line
by Aristotle (Chancellor) on Nov 15, 2002 at 17:59 UTC |