| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
sed problem with regular expression
|
Original Message
|
Name: elpico
Date: April 26, 2005 at 06:32:23 Pacific
Subject: sed problem with regular expressionOS: SolarisCPU/Ram: ? |
Comment: Hi all, I'm having a problem with a script I am using. I need to pass in a directory as a dynamic varible, but this directory needs to get added to lots of different files. So, I'm using sed to change the string from eg, /export/home/walsh to \/export\/home\/walsh - otherwise it doesn't get updated correctly. The script I'm usiong works on the command prompt: my_dir=/export/home/walshk echo $my_dir | sed 's/\//\\\//g' But when I run it from within my ksh script I get the garbled message...any ideas where I'm going wrong with this? Thanks, e.
Report Offensive Message For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Unix Forum Home