Transform text streams; this example prints matching lines without editing files.
sed -n "/WARN/p" app.logLINUX COMMAND ATLAS · COMMAND GUIDE
Transform text streams; this example prints matching lines without editing files.
GNU sedsed [OPTION]... SCRIPT [FILE]...
Transform text streams; this example prints matching lines without editing files.
sed -n "/WARN/p" app.logPrint lines 1 to 20 without printing other lines.
sed -n '1,20p' app.logReplace every old occurrence on each line in the output.
sed 's/old/new/g' names.txtWithout -i, sed writes transformed text to standard output and leaves the source file unchanged. Test scripts on sample data first.