I am trying to create a directory based on a variable entered by a user and then save files there.
I thought this would be simple enough for me but I get an error message "No such file or directory" when I try to save there. When I hit "ls" it lists the directory with a "?" after it.
I am working with an .sh script on a Mac terminal.
Relevant code:
#get user input
echo "enter the collection number"
read COLLECTION
#create the directory
mkdir "$COLLECTION"dir
#calculate a checksum and save it to the above directory
sudo openssl md5 /dev/disk1 > "$COLLECTION"dir/md5.txt
--