Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CLI apps. For fun and profit

CLI apps. For fun and profit

Talk given at Cocoa Kucha on #inspect conference, May 2014

Marin Usalj

May 29, 2014
Tweet

More Decks by Marin Usalj

Other Decks in Programming

Transcript

  1. PIPESTATUS [] $ xcodebuild | tee output.log | xcpretty $?

    => 0 ${PIPESTATUS[0]} => 65 ${PIPESTATUS[2]} => 0 $ xcodebuild | tee output.log | xcpretty; exit ${PIPESTATUS[0]}
  2. BEWARE OF YOUR $SHELL | $SHELL | Exit status |

    Pipe status | Set a var | |--------|-------------|---------------|-------------| | bash | $? | $PIPESTATUS | export VAR= | |--------|-------------|---------------|-------------| | zsh | $status | $pipestatus | export VAR= | |--------|-------------|---------------|-------------| | fish | $status | / | set -x VAR |