Shell Script Advent Calendar 2015 7æ¥ç®ã®è¨äºã§ãã Bashã®ã¡ãã£ã¨ããTipsã§ãã Bashã«éããªãããç¥ãã¾ããããæ¤è¨¼ç°å¢ãBashããããã¾ããã§ããã åé¡ Bash㧠$(command) ã¨æ¸ãã¨ãcommandããµãã·ã§ã«ã§å®è¡ããã stdoutï¼æ¨æºåºåï¼ãå¤æ°ã«æ ¼ç´ãããã¨ãã§ãã¾ãï¼ hoge_value=$(echo 'hoge') # hoge_value => "hoge" ãã ãstderrï¼æ¨æºã¨ã©ã¼åºåï¼ã¯ãã£ããã£ã§ãã¾ããã ãã¾ãstdoutã¨stderrã¸åºåãã100ãè¿ãé¢æ°ãããã¨ãã¾ãã out_err_and_exit() { echo "This is stdout" echo "This \\is \"tricky 'stdout" echo "This is stderr" >&2 ech
{{#tags}}- {{label}}
{{/tags}}