Skip to content

Instantly share code, notes, and snippets.

@merin83
Created November 12, 2017 13:57
Show Gist options
  • Select an option

  • Save merin83/8f780978358a256617b7669680e12fbf to your computer and use it in GitHub Desktop.

Select an option

Save merin83/8f780978358a256617b7669680e12fbf to your computer and use it in GitHub Desktop.
multiple_array_paremeter_func.sh
function copyFiles() {
arr=("$@")
for i in "${arr[@]}";
do
echo "$i"
done
}
array=("one" "two" "three")
array1=("four" "five" "six")
copyFiles "${array[@]}" "${array1[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment