[Linux-Biella] Sed

Paul TT linux@ml.bilug.linux.it
Thu, 05 Feb 2004 11:25:48 +0100


CIARROCCHI, Paolo, VF-IT wrote:

>Qualcuno sa perche' questo comando funziona:
>
>bash-2.05$ sed s/uno/`printf "unoooooo"`/ pippo.txt
>unoooooo
>due
>tre
>
>mentre questo no:
>bash-2.05$ sed s/uno/`printf "unoooooo\t1"`/ pippo.txt
>sed: command garbled: s/uno/unoooooo
>
>bash-2.05$ printf "unoooooo\t1\n"
>unoooooo        1
>
>In pratica voglio sostiturire tutte le ricorrenze di uno con una stringa
>fatta anche di spazi e tabulazioni.
>
>Suggerimenti ?
>  
>

sed "s/uno/`printf "unoooooo\t1"`/" pippo.txt


-- 
It was software, in cyberspace...
There was no system core.
It can not be shut down.
The attack began on 6:18 PM...