I want to be able to run a bash script over each line output from diskutil
activity", I haven't been able to figure out how to do this though.
I thought maybe I could simply:
diskutil activity | xargs bash myScript.sh
I have a feeling that xargs
is just going to wait until diskutil
activity is finished talking, which it will never do until you end the process.
Any suggestions on how I can execute a script per line of output would be appreciated!
Cheers!