empty lines.
This is my example.txt file:
asd asd as sd as asd asd sd gTo take the spaces off you have at least two simple tools to do it.
- sed with this tool you can achieve your goal just by doing this - open a command line prompt and type the following
linux$ cat example.txt | sed -e '/^$/d' you will see on your screen the following
asd asd as sd as asd asd sd g
- grep with this we use a trick saying that we don't want certain patterns from the file - the empty lines - open a command line prompt and type the following
linux$ grep -v '^$' example.txt
asd asd as sd as asd asd sd g
0 comments:
Post a Comment