Skip to content

Instantly share code, notes, and snippets.

@snown
Created September 28, 2014 00:39
Show Gist options
  • Save snown/7161bda8f6124641bb11 to your computer and use it in GitHub Desktop.
Save snown/7161bda8f6124641bb11 to your computer and use it in GitHub Desktop.
A script to search both root and user launchctrl scripts currently registered with the system
#!/usr/bin/env bash
LAUNCH_LIST_PATH=/tmp/launchList
touch $LAUNCH_LIST_PATH
launchctl list > $LAUNCH_LIST_PATH
sudo launchctl list >> $LAUNCH_LIST_PATH
head -n 1 $LAUNCH_LIST_PATH
grep "$@" $LAUNCH_LIST_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment