Created
October 31, 2013 21:41
-
-
Save takuya/7257683 to your computer and use it in GitHub Desktop.
Ruby で指定したコマンドがあるか調べる ref: http://qiita.com/takuya_1st/items/b86278175d797d04ef00
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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