in reply to Re: grep question
in thread grep question
Of course, if one is hellbent on using grep for this, Perl will oblige with WTDIs galore...
One such solution:
perl -e 'print grep { s/param=// } @{[ "param=value" ]};'
...but this hardly qualifies as an argument in favor of using grep here
Agreed. Other than as a proof-of-concept, don't do this. I'd personally use map for the OPs exact stated desire. I suspect, though, if the OP gave the larger context of the problem, better solutions might be apparent.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: grep question
by Tanktalus (Canon) on May 26, 2005 at 23:26 UTC |