Nagy Daniel <n.dan...@gmail.com> 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 debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to