2011/5/12 Mircea MITU <[email protected]>: > Problema este ca $x contine outputul lui egrep intr-o singura linie. > Exemplu: > > $ cat /tmp/x > a b c > 1 2 3 > > $ egrep "(b|3)" /tmp/x > a b c > 1 2 3 > > $ a=`egrep "(b|3)" /tmp/x`; echo $a > a b c 1 2 3 > > Cum pot evita "concatenarea" liniilor?
Proper quoting ;) a=`egrep "(b|3)" /tmp/x`; echo "$a" -- Petre " shell scripting 101" _______________________________________________ RLUG mailing list [email protected] http://lists.lug.ro/mailman/listinfo/rlug
