[Gllug] Quoting within sed

Robert Boulter robboulter at hotmail.com
Mon Aug 4 07:45:53 UTC 2003


Hi,
  I am trying to isssue a sed command to globally alter the directory 
structure within a shell script.
  I have tried all manner of combinations but cannot get round the forward 
quotes on sed i.e.

  $ sed s/usr/usr/cnh/g filename
  $ message garbled

Here i am trying to change the directory usr to usr/cnh.  However single or 
double quotes or backslash  does not seem to remove the special meaning the 
forward slash between usr/cnh has for sed,
  i.e
  usr'/'cnh
  usr"/"cnh
  usr\/cnh

  does not work.  Any suggestions from a struggling beginner would be 
welcome.
Regards Rob.

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list