From kevin@ti.com Fri Jul 11 16:52:30 1997 Path: fu-berlin.de!newsfeed.nacamar.de!howland.erols.net!news.maxwell.syr.edu!cs .utexas.edu!news.ti.com!not-for-mail From: kevin@ti.com (Kevin Earls) Newsgroups: comp.editors Subject: Re: Making changes with SED Followup-To: comp.editors,alt.comp.editors.batch Date: 11 Jul 1997 13:32:32 GMT Organization: Texas Instruments Lines: 28 Message-ID: <5q5clg$ki4$2@tilde.csc.ti.com> References: <33C548A9.5352@clinphys.pmh.toronto.on.ca> Reply-To: kevin@ti.com NNTP-Posting-Host: ews-sherman35.sh-gpl.ti.com In article <33C548A9.5352@clinphys.pmh.toronto.on.ca>, Joseph writes: > >replace this: /dev/dat with this: /dev/tape? > >When I use SED I do the following: > sed s/$mval/$wsval/g $file > $file.new > >where mval=/dev/dat and wsval=/dev/tape ~% set mval="/dev/dat" ~% set wsval="/dev/tape" ~% echo "/dev/dat" | sed 's@'$mval'@'$wsval'@g' /dev/tape sed's delimiters can be anything, that's what screwing you up here. You need to get into the habit of single quoting the script to sed. You'll have a happier life. Trust me. Kevin --