List all applications - output as text file

后端 未结 4 928
南方客
南方客 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:10

    I use the system_profiler command to get my text. Then you can parse as needed.

    system_profiler SPApplicationsDataType
    

    ...

    AppleScript Utility:
    
      Version: 1.1.1
      Last Modified: 5/18/09 10:34 PM
      Kind: Intel
      64-Bit (Intel): Yes
      Location: /System/Library/CoreServices/AppleScript Utility.app
    

    maybe pipe it to a text file and then use sed ....

    Bash commands can be called through applescript if you want to have an application or you can save the script with a .command extension and the user will be able to double-click on it.

提交回复
热议问题