Skip to content

Instantly share code, notes, and snippets.

@AlexanderAllen
Forked from caruccio/bash-named-param
Created January 15, 2016 17:50
Show Gist options
  • Save AlexanderAllen/6ac14d5cc0bf70336286 to your computer and use it in GitHub Desktop.
Save AlexanderAllen/6ac14d5cc0bf70336286 to your computer and use it in GitHub Desktop.
Named parameters in bash
# Do you like python named parameters (kvargs) ?
# Well, you can have it in bash too!!
$ function myfunc() { local $*; echo "foo=$foo, bar=$bar"; }
$ myfunc bar=world foo=hello
foo=hello, bar=world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment