Hello:

I've long used Perl's "in place edit" feature, and understand it and regex 
fairly well, e.g.:

perl -i -p -e "s/oldhostname/newhostname/g" /etc/hosts

However, what is the syntax if I wanted to just process a text stream to 
stdout?, e.g.:

cat /etc/hosts | perl "s/in_text/out_text/g"

I'm sure the answer is fairly simple.  I'd just like to use perl one liners in 
place of awk, cut, grep statements (and get all Perls advanced regex 
capability).

$5 PayPal reward for the best answer!


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to