I can use sed /^$/d <file> to delete all empty lines in a file, but what if I want to print only empty lines? The sed /^$/p <file> command prints all lines in a file.
The reason I want to do this is because we use the EDA (Expedition) program, which uses a regular expression to run rules by network name. I am trying to find a way to search for all networks that have no assigned names. I thought using ^$ would work, but it just finishes searching for all the networks, which is what /^$/p does. So is there any other way to do this?
source share