I wanted to write a grep function to show me all listening ports on my host.
I know how to do it by using the -i function in grep :
netstat -a |egrep -i 'listen'
But now I wanted to write it in regex :
netstat -a |egrep 'm/listen/i'
I thought : m because netstat outputs multiple lines and i because it is LISTEN, so I wanted case insensivety.
However this does not give any output. What am I doing wrong ?