mirror of
https://github.com/cheat/cheat.git
synced 2025-11-05 00:05:27 +01:00
chead sed to remove empty lines
This commit is contained in:
@@ -9,3 +9,6 @@ echo 'It is daytime' | sed 's/day/night/g'
|
||||
|
||||
# To remove leading spaces
|
||||
sed -i -r 's/^\s+//g' file.txt
|
||||
|
||||
# To remove empty lines
|
||||
cat file.txt | sed '/^$/d'
|
||||
|
||||
Reference in New Issue
Block a user