terminal - Export two different commands to txt -


this beginner question, knowledge of applescript , terminal limited.

essentially want run 2 commands , output results single text file on desktop.

ping -t 10 *ipaddress* > ~/desktop/wifi.txt   system_profiler spairportdatatype > ~/desktop/wifi.txt 

i have been trying in applescript, , expecting the first command not return result (i'm expecting packet drops) keep resulting in errors like:

the command exited non-zero status.

an example of how write out wonderful!

thanks in advance.

sam

here's 1 way it:

do shell script "(ping -t 10 www.google.com > ~/desktop/wifi.txt || true) && system_profiler spairportdatatype >> ~/desktop/wifi.txt" 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -