Line Filter with sed
Press Filter.
| No | Line | State |
|---|
What is left
How it works
The script of my practice work removes empty lines from a file with the command sed '/^[ ]*$/d': sed reads the text line by line and deletes every line that matches the pattern between the slashes. The pattern ^[ ]*$ matches a line that has nothing but spaces from its beginning ^ to its end $. On this page the pattern is checked by the browser, so it is a JavaScript regular expression; simple patterns work the same way in sed.