InterviewSolution
Saved Bookmarks
| 1. |
How to remove blank lines from a file - sample.txt in a single command line ? |
|
Answer» sed '/^$/d' sample.txt Here “^” symbol represents the STARTING point of a line and “$” represents the END of the line. Whereas “^$” represents the EMPTY lines , d stands for DELETE . |
|