Skip to content

Instantly share code, notes, and snippets.

@beng
Last active February 9, 2016 15:40
Show Gist options
  • Save beng/29d4905752d7355ea466 to your computer and use it in GitHub Desktop.
Save beng/29d4905752d7355ea466 to your computer and use it in GitHub Desktop.
Credit for this script goes to Isaac (.ike) Levy [email protected]
#############################################################################
# Credit for this script goes to Isaac (.ike) Levy [email protected] #
#############################################################################
#!/bin/sh
yell() { echo "$0: $*" >&2; }
die() { yell "$*"; exit 111; }
try() { "$@" || die "cannot $*"; }
# using it
try cd /some/place
try tar xzvfp /another/place/stuff.tbz
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment