List all applications - output as text file

后端 未结 4 927
南方客
南方客 2021-01-01 07:21

I was just wondering how someone would go about finding all the applications that are installed on Mac OS X 10.5 using preferably applescript and output all their applicatio

4条回答
  •  無奈伤痛
    2021-01-01 08:05

    For poeple like me using bash scripting to reach their goals here is a bash variant of the script:

    #!/usr/bin/env bash
    
    path='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support'
    $path/lsregister -dump | grep -A 1 "^bundle" | grep --only-matching "/.*\.app" | awk -F "/" '{ print $NF }' | awk -F "." '{ print $1 }'
    

    This gives a list of all apps without the .app extension.

提交回复
热议问题