How to run a shell script using Spotlight?

拈花ヽ惹草 提交于 2019-12-02 17:05:40

Save your shell script with a .command suffix - this makes it double-clickable and you should also be able to run it directly from Spotlight too.

I would also like to add, if you need the terminal window to disappear after running the command, you can set the terminal settings to do just that.

It's under settings >> shell >> when the shell exits.

This will still leave Terminal running but the script will at least clean up after itself.

I used this for writing a script to hide and show desktop icons.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!