linux sed generate file with code example Example: sed output to file sed 's/Hello/Hi/g' file-name > file