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


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

Reply via email to