On Monday 25 April 2005 14:30, mihai wrote:
> > Cum as putea face in bash o chestie de genul asta :
> >
> > #Popescu Ionescu
> > 1.2.3.4
> > Vreau sa fac un script sa puna # in fata la 1.2.3.4, si chiar sa
> > scoata  # din fata.
>
> [EMAIL PROTECTED]:~$ cat popa
> #popa
> 1.2.3.4
> [EMAIL PROTECTED]:~$
>
>
> sed 's/1.2.3.4/#1.2.3.4/' popa
> #popa
> #1.2.3.4

In expresia regulata trebuie "escapate" punctele altfel poti pati o chestie de 
genul:

echo "192.3.4.5" | sed 's/1.2.3.4/#1.2.3.4/'
#1.2.3.4.5


Mihai


-- 
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://linux.bitdefender.com/


--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui