I’m trying to write a script that takes a directory, copies all its files to a new directory that I create. So the script has two arguments. The first being an existing directory, and the second being the created directory.
Here is what I have so far:
dir1=$1
dir2=$2
mkdir $2
cp $1/. $2
Yet my new directory is always empty. Is it a syntax error?
Do you need to add recursion.