shell script ã¯æ®æ®µããã¦éãããã¨é¡ã£ã¦ãã¾ãªãããã§ããããã¾ã«ã¯æ¸ããªãã¨ãããªããã¨ãããã®ã§ãããããã¨ãã¯è¦ãã¦ããã¨ä¾¿å©ãª tips ã2ã¤ã autodie ã£ã½ãããset -eã¨ããã¨ãã³ãã³ãã®å®è¡ã«å¤±æããã¨ãã«ããã§å®è¡ãã¨ã¾ãã®ã§ä¾¿å©ã #!/bin/sh set -e perl -e 'die' echo SHOULD NOT REACH HEREã¨ãã㨠% ./hoge.sh Died at -e line 1. % echo $? 255ã¨ãªã£ã¦ãæå¾ã¾ã§ãããã«æ»ã«ã¾ãã è¤æ°ã®ã³ãã³ããé çªã«å®è¡ããã¨ãã«ä¾¿å©ã ãªãã以ä¸ã®ãããªæåããããã ããã§ãã ãã ã失æããã³ãã³ãã until ã¾ã㯠while ã«ã¼ãã®ä¸é¨ã§ããã if æã®ä¸é¨ã§ããã && ã¾ã㯠|| ãªã¹ãã®ä¸é¨ã§ããã ã³ãã³ãã®è¿ãå¤ã ! ã§å転ããã¦ã
{{#tags}}- {{label}}
{{/tags}}