Computing.Net > Forums > Unix > UNIX sed

UNIX sed

Reply to Message Icon

Original Message
Name: ajayashree
Date: September 27, 2005 at 14:00:45 Pacific
Subject: UNIX sed
OS: Unix
CPU/Ram: -
Comment:

Hi,
I am using sed change command in a script.
In a file i need to change a particular line.
This is the command I am using.

sed '/^export INFO_PASSWORD/ c\
export INFO_PASSWORD="'$var'"' $PRICER_DIR$TEST_FILE >$INFO_ENV_FILE

The problem is when the variable
var=\/JAH>80\?A@pmJ, the backslash charatcer is not appended. Hence the full value is not changed in the script. The value appended is without the backslash(/JAH>80\?A@pmJ). I tried using escape character , but does not seem to work. Please let me know the solution for the same.



Report Offensive Message For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: UNIX sed

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software