![]() |
|
|
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 |
| Loop problem with one more problem | aliahsan81 | Shell Programming and Scripting | 3 | 01-07-2009 02:02 AM |
| problem in finding a hardware problem | girish.batra | SUN Solaris | 8 | 09-09-2008 11:10 AM |
| ssh script problem problem | pcjandyala | Shell Programming and Scripting | 2 | 07-31-2008 04:27 PM |
| problem with dd command or maybe AFS problem | Anta | Shell Programming and Scripting | 0 | 08-25-2006 11:10 AM |
| SSH Problem auth problem | budrito | UNIX for Advanced & Expert Users | 1 | 03-17-2004 10:12 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Problem with sed
Hi all, i am writing a shell script to replace a variable using sed command. The snippet is as follows:- Code:
# to find the value of APPDIR
# APPDIR 's value needs to be changed
x=`grep APPDIR /dir1/dir2/resp_cde.ats`
# the new value of APPDIR
new=/cd_e/fg/h
# to replace APPDIR with new value
sed "s#$x#$new#" ${LOC1}/resp_cde.ats > ${LOC1}/resp2.ats
Now the problem is the value is not getting replaced. Instead the new file which is getting created has the same value as that of the old one. Can any one please help me out regarding this problem. Thanks, Vikas Last edited by tayyabq8; 03-31-2009 at 09:02 AM.. Reason: Added code tags |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|