Pham Quỳnh
New member
How do you grep blank lines in Unix?
Answer
To match empty lines, use the pattern ‘ ^$ ‘. To match blank lines, use the pattern ‘
^[[:blank:]]*$ ‘. To match no lines at all, use the command ‘ grep -f /dev/null ‘.
Answer
To match empty lines, use the pattern ‘ ^$ ‘. To match blank lines, use the pattern ‘
^[[:blank:]]*$ ‘. To match no lines at all, use the command ‘ grep -f /dev/null ‘.