Last active
August 29, 2015 14:13
-
-
Save new-village/dbe61bacb151e2fb7042 to your computer and use it in GitHub Desktop.
オブジェクト指向ぽいシェルの書き方
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
# func test | |
function ExecOop() { | |
if `Check`; then | |
echo "success" | |
else | |
echo "failure" | |
fi | |
} | |
function Check() { | |
echo "true" # "true":true /except "true":false <- preferment | |
return 1 # 0:true <>0:false | |
# result is true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment