sed is stream editor, but can edit files directlysed -i -e 's/foo/bar/g' hello.txt
s is used to replace the found expression "foo" with "bar" and g used toreplace any found matches.
-i option is used to edit in place on hello.txt.-e option indicates a command to run.