Nagy Daniel <[email protected]> wrote:
> cat text.txt | perl -ne 'print "$1\n" while (/href=\"(.+?)\"/ig)' | grep
> sourceforge | grep nvu
You don't need cat for a single file!
perl -ne 'print "$1\n" while (/href=\"(.+?)\"/ig)' text.txt |
grep sourceforge | grep nvu
Or, by using perl in a single command,
perl -ne 'while (($m) = /href=\"(.+?)\"/ig &&
$m =~ /sourceforge/ && $m =~ /nvu/) { print "$m\n" }' text.txt
Chris
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]