linux:sed
This is an old revision of the document!
sed
Tool for doing stuff with lines, or perhaps stream of characters..
Using as regex to get stuff
By default, everything that is not deleted (by a delete command) is printed to stdout. To inhibit this, pass '-n' flag.
sed '/actual pattern/command' # ex sed '/Matches this string/p' # command p is printed. But since -d flag is not provided, so will everything else too sed -n '/Matches this string/p' # Only prints rows containing "Matches this string"
linux/sed.1639224684.txt.gz · Last modified: 2022/09/12 00:30 (external edit)
