# To replace all occurrences of "day" with "night" and write to stdout:
sed 's/day/night/g' <file>
# To replace all occurrences of "day" with "night" within <file>:
sed -i 's/day/night/g' <file>
# To replace all occurrences of "day" with "night" on stdin:
echo 'It is daytime' | sed 's/day/night/g'
# To remove leading spaces:
sed -i -r 's/^\s+//g' <file>
# To remove empty lines and print results to stdout:
sed '/^$/d' <file>
# To replace newlines in multiple lines:
sed ':a;N;$!ba;s/\n//g' <file>
# To insert a line before a matching pattern:
sed '/Once upon a time/i\Chapter 1'
# To add a line after a matching pattern:
sed '/happily ever after/a\The end.'
Monday, 26 May 2025
sed
ccze
ccze - log colorizer sudo tail -f /var/log/syslog | ccze
-
7z : Compression utility aa : a simple utility to help create backups ab : Apache HTTP server benchmarking tool aespipe : AES encrypti...
-
AutoArchive is a simple utility to help create backups more easily. Usage aa [ options ] [ command ] [ AA_SPEC …] autoarchive [ option...
-
apache bench: Apache HTTP server benchmarking tool ab -n 1000 -c 10 -k -H "Accept-Encoding: gzip, deflate" https://example.com/