Summary: OT Sed question

From: Sriman Kumaran <>
Date: Tue Jan 10 2006 - 06:40:11 EST
   Thanks for the value inputs,  I ended up using it this way:
sed "s#`echo <variable_has_the string>`#new_value#g" old_file >new_file


Sriman Kumaran <> wrote:      Dear Managers,

I am using sed to update password file. When work with encrypted passwords you will find special chars such as /. If I do it manually I can escape it with \, but in side script and using variables how could I escape it?. For example:
sed "s/old-password/new-password/g" old_file >new_file. If either old_password or new_password has special charactor (/) then it will fail I have to replace old_passowrd and new_password with real values (escapeing the /) and run the script.


  To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.

Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 
sunmanagers mailing list
Received on Tue Jan 10 06:40:46 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:54 EST