linux:sed
This is an old revision of the document!
Linux - SED
Remove all blank lines from a file
Remove all leading and trailing whitespace from a file
Remove all leading and trailing whitespace from end of each line:
cat input.txt | sed 's/^[ \t]*//;s/[ \t]*$//' > output.txt
Remove all whitespace (including tabs) from string
Remove all whitespace (including tabs) from beginning of string
linux/sed.1575974673.txt.gz · Last modified: 2020/07/15 09:30 (external edit)