What is Nostr?
Aaron Rainbolt /
npub1kaj…dh8c
2024-06-27 18:04:35

Aaron Rainbolt on Nostr: You can run multiple commands as a single "block" in Bash using C-style braces. This ...

You can run multiple commands as a single "block" in Bash using C-style braces. This can be useful for error handling - you can do things like "cd /mydir || { echo "could not cd to /mydir"; exit 1;};" Make sure to remember the semicolon on the last command before the closing brace though, or Bash won't be able to figure out where the block ends.

#linux #bash #shell #scripting
Author Public Key
npub1kajdlnj8g3usaj46s5djntm82rrq5fxn0y4pf2y3yqulp76mancsdqdh8c