sed -i s/"what to replace"/"with what to replace"/g $file
-i to select in-place editing on the
In some systems it is required to add suffix after
-i flag which will be used to create backup of original file. You can add empty string like
-i '' to omit the backup creation. Look at Remarks in this topic about
g terminator means do a global find/replace in each line.
$ cat example one two three total $ sed -i s/"t"/"g"/g example $ cat example one gwo ghree gogal