Answers for "pass an array to bash function"

0

pass an array to bash function

#!/bin/bash
function copyFiles() {
   arr=("[email protected]")
   for i in "${arr[@]}";
      do
          echo "$i"
      done

}

array=("one 1" "two 2" "three 3")

copyFiles "${array[@]}"
Posted by: Guest on August-03-2021

Code answers related to "pass an array to bash function"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language