Removing blank lines from a file is very simple in bash. Here are two ways in which this can be accomplished using “sed” and “grep” sed -i '/^$/d' filename and grep -v '^$' inputfile > outputfile
↧