Last active
September 26, 2018 12:02
-
-
Save caruccio/797fd0d5ab76dae6a8e1d3778a2dec58 to your computer and use it in GitHub Desktop.
Spread parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ function spread_parameter { | |
local p="$1" | |
shift | |
local IFS="," | |
eval "echo $(echo "$p\ {$*}")" | |
} | |
$ spread_parameter --include '*.jpg' '*.gif' '*.svg' | |
--include *.jpg --include *.gif --include *.svg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment