[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: doubt in using sed



Am 2007-03-09 15:01:51, schrieb L.V.Gandhi:
> I have made a script like this as test1
> #!/bin/bash
> line="3IINFOTECH,20050422000000,118,118,96,98.1,8260440"
> olds=$(echo "$line"|cut -d, -f2)
> echo $olds
> da=${olds:0:8}
> echo $da
> echo "$line" > temp1
> sed -e 's/$olds/$da/' temp1 >>temp
         ^            ^
sed -e "s/$olds/$da/" temp1 >>temp

> cat temp1
> cat temp

Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSN LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


Reply to: