On 2010.07.09 21:40, Uri Guttman wrote: >>>>>> "SB" == Steve Bertrand <st...@ipv6canada.com> writes: > > SB> But alas, I get nothing, so I tried this as my last line, thinking that > SB> the input would be put in $_: > > SB> perl -e '$_ =~ s/.*\s+//; print $_' > > what input? i see none there. but what you want is either -p or -n. both > are among the most useful options for perl oneliners. look them up in > perlrun and pick which one you want.
I did look them up. The one-liners were but an example of what I wanted. My original post had the following with my perl command accepting much input in the final line (note: fixed a rogue $ in an egrep): % egrep -r "sub \w+ {" * \ | grep -v svn \ | awk '{FS=":"} {print $1, " ", $2}' \ | awk '{FS=" "} {print $1, " ", $3}' \ | egrep "^lib/ISP/User.pm" \ | perl -p -e 's/.*\s+//' What I'm not understanding, is why perl isn't printing anything when I do that, but I can confirm that the input that I *think* I'm shoving in is valid by doing this: % egrep -r "sub \w+ {" * \ | grep -v svn \ | awk '{FS=":"} {print $1, " ", $2}' \ | awk '{FS=" "} {print $1, " ", $3}' \ | egrep "^lib/ISP/User.pm" ...results in: lib/ISP/User.pm new lib/ISP/User.pm build_db_user lib/ISP/User.pm client_info lib/ISP/User.pm add_client lib/ISP/User.pm delete_client lib/ISP/User.pm add_plan lib/ISP/User.pm _init_plans lib/ISP/User.pm username_to_login ...etc Steve -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/