I was trying to parse the output of netstat on my mac today, and I used:
netstat | egrep "*tcp*"
It throws an error for for "operand invaliid", so I tried:
netstat | egrep ".*tcp.*"
...which works great.
Then I tried both of those commands in Cygwin. Neither command returns anything, although neither throws an error. I checked to make sure there were tcp connections, by running netstat by itself.
Why is egrep giving a different result for Mac OS and Cygwin?