in reply to Re: command line pipe
in thread command line pipe

perl -n -e'/^Station/ and print' *.txt

And that's probably how I would do it, however, those who use this common and powerful feature should be aware that there is a very small security risk associated with using the -p or -n switches with a glob on the command line. Don't do it in directories that can hold filenames originating from an untrusted source. Here's a short demo of why that could be bad...

$ touch '| echo uh oh;#.txt' && perl -n -e0 *.txt && rm '| echo uh oh; +#.txt' uh oh

I once promised tye that I would try to do my part in spreading the word about this. It isn't at all likely to pose a real threat, but you should be aware of it just the same. For an in-depth discussion on the subject, see Dangerous diamonds!

-sauoq
"My two cents aren't worth a dime.";