Bash script, watch folder, execute command

后端 未结 12 1297
小鲜肉
小鲜肉 2020-12-04 08:57

I am trying to create a bash script with 2 parameters:

  • a directory
  • a command.

I want to watch the

12条回答
  •  有刺的猬
    2020-12-04 09:16

    Why not using AppleScript

    http://www.tuaw.com/2009/03/26/applescript-exploring-the-power-of-folder-actions-part-iii/

    on adding folder items to this_folder after receiving added_items
    tell application "Finder"
    ...
    

提交回复
热议问题