|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
hi
i want configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"` to be appended to the file configure but $1 sld be replaced by the command line argument supplied to shell script hv tried out commands but $1 is not being replaced the one i tried is sed -i -e '$a\configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"`' configure what should be done to write the value of $1 thanx Jyoti |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
On 22 Aug 2006 21:27:00 -0700, JyotiC
<jyoti.chhabra@gmail.com> wrote: > hi > i want > configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"` > to be appended to the file configure but $1 sld be replaced by the > command line argument supplied to shell script > > hv tried out commands but $1 is not being replaced > the one i tried is > sed -i -e '$a\configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"`' > configure > > what should be done to write the value of $1 > thanx > Jyoti > sed -i -e '$a\configdirs=`echo " ${configdirs} " | sed -e "s/ '$1' / /"`' -- <Mercury> Knghtbrd: Hey, perl has the power grace and elegance of a sledge hammer. (=:] <|Rain|> certainly the grace and elegance, anyway |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
thanx for your
Bill Marcum wrote: > On 22 Aug 2006 21:27:00 -0700, JyotiC > <jyoti.chhabra@gmail.com> wrote: > > hi > > i want > > configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"` > > to be appended to the file configure but $1 sld be replaced by the > > command line argument supplied to shell script > > > > hv tried out commands but $1 is not being replaced > > the one i tried is > > sed -i -e '$a\configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"`' > > configure > > > > what should be done to write the value of $1 > > thanx > > Jyoti > > > sed -i -e '$a\configdirs=`echo " ${configdirs} " | sed -e "s/ '$1' / /"`' > > > -- > <Mercury> Knghtbrd: Hey, perl has the power grace and elegance of a sledge > hammer. (=:] > <|Rain|> certainly the grace and elegance, anyway |
|
|
|
#4 (permalink) |
|
Messages: n/a
Hébergeur: |
On 22 Aug 2006 21:27:00 -0700, JyotiC wrote:
[...] > configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"` > to be appended to the file configure but $1 sld be replaced by the > command line argument supplied to shell script > > hv tried out commands but $1 is not being replaced > the one i tried is > sed -i -e '$a\configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"`' > configure [...] printf '%s\n' >> configure \ "configdirs=\`printf '%s\n' " \$configdirs " | sed 's/ $1 / /'\`" -- Stephane |
|
|
|
#5 (permalink) |
|
Messages: n/a
Hébergeur: |
thanx for ur
Stephane Chazelas wrote: > On 22 Aug 2006 21:27:00 -0700, JyotiC wrote: > [...] > > configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"` > > to be appended to the file configure but $1 sld be replaced by the > > command line argument supplied to shell script > > > > hv tried out commands but $1 is not being replaced > > the one i tried is > > sed -i -e '$a\configdirs=`echo " ${configdirs} " | sed -e "s/ $1 / /"`' > > configure > [...] > > printf '%s\n' >> configure \ > "configdirs=\`printf '%s\n' " \$configdirs " | sed 's/ $1 / /'\`" > > > -- > Stephane |
|
![]() |
| Outils de la discussion | |
|
|