Skip to content

Instantly share code, notes, and snippets.

@gilesbowkett
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilesbowkett/8884428acf3f8aae4b84 to your computer and use it in GitHub Desktop.
Save gilesbowkett/8884428acf3f8aae4b84 to your computer and use it in GitHub Desktop.
# bash script
# accomplishes https://twitter.com/raganwald/status/501535500365086720
function MacBook() {
if [ $1 == "THELONIUS" ]
then
if [ $2 == "Air" ]
then
arguments=($@)
new_arguments=()
for i in $(seq 2 $(expr $# - 1))
do new_arguments+=( ${arguments[$i]} )
done
sudo "${new_arguments[@]}"
else
echo "whatever DAD"
return 1
fi
else
echo "I'll do it later"
return 1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment