Skip to content

Instantly share code, notes, and snippets.

@takuya
Created October 31, 2013 21:41
Show Gist options
  • Save takuya/7257683 to your computer and use it in GitHub Desktop.
Save takuya/7257683 to your computer and use it in GitHub Desktop.
Ruby で指定したコマンドがあるか調べる ref: http://qiita.com/takuya_1st/items/b86278175d797d04ef00
def cmd_exists?( name ) ;` type "#{name}" 2> /dev/null` != "" ; end
alias cmd_exists cmd_exists?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment