Quote:
Originally Posted by Saro
if anyone could be so kind and explain the following command, i know what it does, but i don't get 's/ and /g part.
sed 's/bob/Bobs/g' letter > anotherletter
thanks
|
the "s" tells Sed to execute the substitute command
bob is the original string
Bobs is the replacement string
the "g" is global flag which it will replace all and any bob to Bobs
Looks like the change is happening to a file called letter. However the changed output is getting sent to a new file called anotherletter.