|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
Sed problem
HI,
I have a file test which content are as APP_NAME="%APPNAME%" Now, i m using sed command to replace the %APPNAME% with variable APPNAME. Here variable value is as export APPNAME="AB" sed -i "" -e "s:%APPNAME%:$APPNAME:" ./test test file become as APP_NAME="AB" Which is expected result. But when APPNAME value is "A&B" it become as APP_NAME="%AAPPNAMEB%" & is substituting variable name. While it should be as( expected result) APP_NAME="A&B" Any one helps me. Last edited by Saurabh78; 03-24-2009 at 09:13 AM.. |
| Sponsored Links |
|
|
|
|||
|
Quote:
Code:
sed -i 's/%APPNAME%/%'$APP_NAME'%/' ./test Regards |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
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 | 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 |