BASH - Run command for each line in output of previous command
- by user1582375
All,
I am want to request all network services using:
networksetup -listallnetworkservices
I then want to run the below command for each line in produced from the above command:
networksetup -setautoproxyurl "A LINE FROM ABOVE" http://etc...
Adiitonally, I only want to issue the setautoproxyurl command for service with "Ethernet" or "Wi-Fi" in the name
networksetup -listallnetworkservices | while read line; do networksetup -setautoproxy $line http://etc...