simple script question

Condon Thomas A KPWA tcondon
Mon May 17 11:37:23 PDT 2004


> This is fairly straight forward:
> 
> cat file | sed  's/\/usr\/local/\/usr/g'  

I've never used sed (except in scripts someone sent me), so I don't know if
it adheres to the same substitute command rules as vi.  If it does this
could be written as:

cat file | sed 's]/usr/local]/usr]'

where you could replace the ']' with any of the accepted special characters
and then you wouldn't have to backslash the slashes.  vi allows almost *any*
special character to be used as the divider in a substitute command in Unix.
Does this work in Linux as well?


In Harmony's Way, and In A Chord,

Tom  :-})

Thomas A. Condon
Barbershop Bass Singer
Registered Linux User #154358
A Jester Unemployed



More information about the Linux-users mailing list