Mailinglist Archive: opensuse-de (4938 mails)

< Previous Next >
Re: Problem mit sed/regex;;
  • From: David@xxxxxxxxxx (David Haller)
  • Date: Tue May 23 22:55:07 2000
  • Message-id: <XFMail.000524005445.David@xxxxxxxxxx>



Hallo Bernd,

Bernd Brodesser wrote:
* Marc Schiffbauer schrieb am 23.Mai.2000:
VAR3=`echo XXabXX | sed s/$VAR1/$VAR2/`

VAR3=`echo XXabXX | sed 'sed s|$VAR1|$VAR2|'`

Das funzt bei mir nicht. $ ./test.sh
sed: -e expression #1, char 18: Unterminated `s' command

Das dann naheliegende:

VAR3=`echo /home/marc/test.sh | sed 's|$VAR1|$VAR2|'`

mach gar nichts, was aber klappt ist:

VAR3=`echo /home/marc/test.sh | sed "s|$VAR1|$VAR2|"`

(Achso: bei mir ist VAR1=marc, VAR2=dh/bin ;)

CU
David


--
2 is a really odd prime...

email: David@xxxxxxxxxx www: www.dhaller.de

---------------------------------------------------------------------
To unsubscribe, e-mail: suse-linux-unsubscribe@xxxxxxxx
For additional commands, e-mail: suse-linux-help@xxxxxxxx


< Previous Next >
Follow Ups
References