Shell Script Pro Tips

Check if a program exists from a Bash script

Where bash is your shell/hashbang, consistently use hash (for commands) or type (to consider built-ins & keywords).

When writing a POSIX script, use command -v.

emacsclientを使ってEmacsの起動を速くする – 計算物理屋の研究備忘録

supplement

As a special exception, if command is the empty string, then emacsclient starts Emacs in daemon mode (as emacs --daemon) and then tries connecting again.

GNU Emacs Manual: emacsclient Options

[Mac Only] show/hide invisible files in Finder

show

$ defaults write com.apple.finder AppleShowAllFiles YES
$ killall Finder

hide

$ defaults write com.apple.finder AppleShowAllFiles NO
$ killall Finder

Leave a Reply

Your email address will not be published. Required fields are marked *