Tag: enter lang \ \ Keep www www. How to enter blank
As follows: How to delete blank lines
Shen\nshen\\nsensehsehesheshe
To really delete empty lines, you can use VIM:
- Delete empty lines through command mode. Vim in command mode (enter English characters in vim: Enter command mode) input: %s/^n//G. replaces all characters that begin with a carriage return, substituting null.
- If you have more than one contiguous blank line, you want to keep a row. Then simply enter the following line in the command lines mode:%s/^n$//g
The Linux pipline output is the removal method:
1, grepgrep-v ' ^$ ' file2, sedsed '/^$/d ' file or sed-n '/./p' file 3, awk: $ A line for awk '/./{print} ' File or awk ' {if ($0!= "") Print} '4"\ n"
Main reference: http://www.361way.com/del-blank-line/2225.html
Linux Delete empty line operations: awk, grep, tr, sed