sed
“d” command lets us print specific lines based on the line number or regex provided.- When
^
means beginning of the line and$
denotes end of the line,^$
makes a “Blank Line”, very useful while removing empty lines from a file.
Read more at YourOwnLinux