Skip to content

Instantly share code, notes, and snippets.

@samkcarlile
Created February 1, 2019 00:20
Show Gist options
  • Save samkcarlile/9a98146bb48ef3779d2776108aa11cc6 to your computer and use it in GitHub Desktop.
Save samkcarlile/9a98146bb48ef3779d2776108aa11cc6 to your computer and use it in GitHub Desktop.
Get's the name of all MacOS applications that are found in the ~/Applications or /Applications folder
#!/bin/bash
ps -u $(whoami) -x -o comm | egrep -o '/Applications/([A-z0-9 ]+/)?[A-z0-9 ]+\.app' | sort -u | egrep -o '[A-z0-9 ]+\.app' | awk '{if (NR!=0) {print substr($0, 1, length($0) - 4)}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment