Skip to content

Instantly share code, notes, and snippets.

@dblevins
Created September 10, 2009 22:56
Show Gist options
  • Save dblevins/184894 to your computer and use it in GitHub Desktop.
Save dblevins/184894 to your computer and use it in GitHub Desktop.
#!/bin/bash
function somecommand {
echo "$# args:"
for n in "$@"; do
echo "- $n"
done
echo
}
export OPTIONS="first option"
## attempting to splice these two lines into an existing script
export ADDED="second option"
export OPTIONS="$ADDED $OPTIONS"
##
somecommand $OPTIONS
somecommand "$OPTIONS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment