Reputation: 65
I am trying to visualise all new sockets created after a save point in Debian Linux 5.14:
ss -a > state
ss -a | grep -v -f state
Expected output : Nothing
Observed output : The same as ss -a
I checked the content of the file and every line does properly end with a $ indicating it's multine.
Can't truely grasp why this happens, did anyone encounter this before ?
Upvotes: 0
Views: 60
Reputation: 361710
-F
so the lines are treated as fixed strings and not regexes. This ensures that items like *
and [::ffff:127.0.0.1]
are not treated as wildcards and character classes.-x
to match whole lines.$ ss -a > state
$ wc -l < state
1867
$ ss -a | grep -vxFf state | wc -l
56
Upvotes: 1