I'm trying to run the following command to process the output via Swift 2.0 but I'm having trouble doing so.
netstat -w1 -I en | awk '{ print $3 }'
The command runs as expected when ran manually from the terminal.
I tried the method of calling /bin/sh -c
with the full command as an argument but that doesn't output anything. (Similar to https://stackoverflow.com/a/29549342/2110967).
I also tried to pass the data over stdout/stdin from the netstat to the awk but didn't have much luck.
I also tried placing the code into a .sh
file and running from there but again the output was never returned.