2
votes
2answers
70 views

OS X: how to keep the computer from sleeping during a http connection

An application I use downloads data from a specific server, and I need it to sleep after the download has finished and the socket is closed. However downloads take place at random days, the app that ...
2
votes
4answers
3k views

How to do an IF statement from the result of a executed command

I am trying to do an IF statement from the output of an executed commmand. Here is how I am trying to do it, but it doesn't work. Does anyone know the right way to do this? if [ "`netstat -lnp | ...