Hi I stuck with some script that is doing some text filtering
script is counting occurrences by doing:
cat file | sort | grep -v "^$" | uniq -c | sort -nr | head -20
Is not obvious for me how will grep -v "^$" works. As I am understanding -v which is invert the sense of matching, inverting pattern with begging of line and end of line is not obvious for me.
I was trying few examples but is not clear to understand for me how it works (i.e. it filter spaces but not carriage returns)