![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rsh to change multiple ip in multiple servers? | kenshinhimura | Shell Programming and Scripting | 2 | 02-18-2008 03:04 AM |
| About NIMs | Mustur007 | AIX | 1 | 08-14-2007 05:06 PM |
| Career Path/Change - Cert Help | CoopDeVille | What's on Your Mind? | 2 | 06-15-2007 09:41 PM |
| Change Default Path ? | tkbharani | UNIX for Advanced & Expert Users | 4 | 01-14-2007 03:53 AM |
| How to loop thru and change multiple files in realtime system? | merliech | Shell Programming and Scripting | 2 | 04-25-2006 01:25 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
to change a path /appl/nims with an /appl2/nimsrobt in multiple files using sed
Hi All,
I have developed a script in which i have taken the path from the user in a variables named FromPath and ToPath. I want to replace the FromPath with ToPath. For that I am using sed command in the following way. cp $file bk_$file FromPath=/appl/nims/nimsc1 FromPath=`echo $FromPath | sed 's/\//\\//g' It should return \/appl\/nims\/nimsc1 to use it in SED command. sed 's/$FromPath/$ToPath/g' bk_$file > $file But it is not working and it is raising an error command garbled. It is working fine on the unix prompt. but in script it is raising an error. So please co-operate me and tell me what wrong I am doing. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|