mirror of
https://github.com/Erreur32/cheat.git
synced 2025-03-13 20:18:47 +01:00
chead sed to remove empty lines
This commit is contained in:
parent
4960f45f6f
commit
53a2a616d0
1 changed files with 3 additions and 0 deletions
|
@ -9,3 +9,6 @@ echo 'It is daytime' | sed 's/day/night/g'
|
||||||
|
|
||||||
# To remove leading spaces
|
# To remove leading spaces
|
||||||
sed -i -r 's/^\s+//g' file.txt
|
sed -i -r 's/^\s+//g' file.txt
|
||||||
|
|
||||||
|
# To remove empty lines
|
||||||
|
cat file.txt | sed '/^$/d'
|
||||||
|
|
Loading…
Reference in a new issue