Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foocommand && foocommand2 && foocommand3
- #!/bin/sh
- ls -lh &&
- # This is a comment
- echo 'Wicked, it works!'
- #!/bin/bash -e
- foocommand || exit 1
- foocommand2 || exit 2
- foocommand3 || exit 3
- if foocommand; then
- # some comments
- if foocommand2; then
- # more comments
- foocommand3
- fi
- fi
- foocommand &&
- # some comment
- foocommand2 &&
- # more comment
- foocommand3
- { { false && echo "inner true"; } && { echo "inner true" && true; } || { echo "inner false" && false; } || echo "outter false"; }
- big_block_1() {
- # ...
- }
- big_block_2() {
- # ...
- }
- big_block_3() {
- # ...
- }
- big_block_1 && big_block_2 && big_block_3
- function fail() {
- echo "Failure: ${@}"
- exit 1
- }
- foocommand || fail "couldn't foo"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement