sau asa:

echo "string" | perl -nle '/(\d+)/ && print $1;'

ex:

radusch:~ # echo "aa
> bb
> 12
> ff
> 14
> bb" | perl -nle '/(\d+)/ && print $1;'
12
14
radusch:~ #


radu



2008/9/2 rzeno <[EMAIL PROTECTED]>:
>
> echo 'ana are 16 mere
> 12 pere si
> 425 cirese' | perl -e 'while(<>){
> chomp;
> print /(\d+)/,"\n";
> }'
>
> nu te pune nimeni sa scri intr-o singura linie, :)
>

_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui