Summary: OT Sed question

From: Sriman Kumaran (sriman_kumaran@yahoo.co.uk)
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

Thanks

Sriman Kumaran <sriman_kumaran@yahoo.co.uk> 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.

Thanks
Sriman

    
---------------------------------
  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
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:38:24 EDT