I have an Ubuntu 12.04 server here and I have a process that can use some ports in my system.
The way I have to track these ports is this command:
ps ax | grep thin | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}\:[0-9]{1,5}'
Now I want to use this command as an array variable in a shell script.
How do I parse the values there to an array?
The value looks like this:
0.0.0.0:3000 0.0.0.0:3001 0.0.0.0:3002 0.0.0.0:3003
Thanks!