sed change string in file in a loop code example Example: sed replace in file sed -i 's/foo/bar/g' hello.txt