26.02.2013 00:05 Uhr, Quelle: The Unofficial Apple Weblog

Terminally Geeky: How to tell if a script is being called from launchd

Warning: command line geekiness ahead. When writing shell scripts, I often send interactive output to the user via echo to give feedback or information. But if the shell script is called on a schedule via OS X's behind-the-scenes process launcher launchd, rather than from a Terminal session, chances are that I won't ever see that message. Fortunately, it's relatively easy to figure out if a shell script has been called from launchd or not, simply by checking the $PPID variabl

Weiterlesen bei The Unofficial Apple Weblog

Digg del.icio.us Facebook email MySpace Technorati Twitter

JustMac.info © Thomas Lohner - Impressum - Datenschutz