On Wed, 2002-09-18 at 18:43, James Sparenberg wrote: > All, > > Need to do something in shell (it's a script inside an RPM is why) > basically I have this situation. > > > read floc < /var/tmp/ftpname # ftpname is the absolute path to the > # ftp/pub directory. > > sed -e "s/floc/$floc/g" somefile > somefile.tmp
Nothing like answering your own question.... finally found the answer sed -e "s#floc#$floc#g" somefile > somefile.tmp This does the job now the # is the separator instead of instead of / and everybody works... *sigh* James > > > Problem is that the absolute path contains /'s because thats the way the > user enters the absolute path to his/her ftp directory. Of course sed > doesn't like this at all. I can't ask the user to enter \/ instead of / > (Ok I could but I would be on the phone/e-mail list 24/7 answering the > same "problem" over and over) question is how can I make this > substitution in shell script without requiring my user to stand on > his/her head? None of the books/online tutorials cover a situation like > this and I'm getting balder by the minute here.. HELP! *grin* > > James > > > > ---- > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
