sed
Text ProcessingStream editor for filtering and transforming text
Options & Flags
Available options for this command
-iEdit files in-place
-eAdd script to commands to be executed
-nSuppress automatic printing
Examples
Common usage examples
Replace first occurrence of 'old' with 'new' on each line
sed 's/old/new/' file.txtReplace all occurrences of 'old' with 'new'
sed 's/old/new/g' file.txtReplace in file (in-place edit)
sed -i 's/old/new/g' file.txt