Is there a way to have each result of grep followed by newline for example if the result of grep is:
1
2
3
I need it to be:
1
2
3
To match empty lines, use the pattern ' ^$ '. To match blank lines, use the pattern ' ^[[:blank:]]*$ '. To match no lines at all, use an extended regular expression like ' a^ ' or ' $a '.
grep "pattern" /path/to/file | awk '{print $0,"\n"}'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With