Directory src
has two subdirectories: this that
and here & now
. What bash script (under macOS) will move both those subdirectories into directory target
?
I tried the following, with and without the escaping of embedded spaces and of the "&", but neither works:
#! /bin/bash
dirArray=("this that" "here\ \& now")
for val in "${dirArray[@]}"
do
mv $val ~/Desktop/HoldMath/
done