sed stands for Stream Editor.
It is a powerful command-line tool on Linux and macOS. It's main job is to find and change text inside files.
sed [OPTIONS] 'SCRIPT' [INPUT_FILE...]- OPTIONS: Settings that change how
sedworks. - SCRIPT: The command you want to run and change text.
- INPUT_FILE: The file you want to read. If you don't provide a file, sed reads from standard input (like a pipe
|).
NOTE: If use sed without -i option, only prints the changes and It does not change the original file. you can check your changes at frist.
sed -i 'SCRIPT' [INPUT_FILE...]NOTE: Your changes saving in the file directly using the -i (--in-place) flag. so be careful to using this.
https://www.youtube.com/watch?v=9YOZmI-zWok
https://www.youtube.com/watch?v=EACe7aiGczw
https://www.youtube.com/watch?v=_0IFtMFYroU&pp=0gcJCesJAYcqIYzv
lex friedman and Brian Kernighan
https://www.youtube.com/watch?v=W5kr7X7EG4o
Computerphile and Brian Kernighan
https://www.youtube.com/watch?v=NTfOnGZUZDk