I am a complete beginner in this topic and I usually search for a solution rather than just asking a question because I am sure that somebody had a similar problem. But this time I couldn't find a way to solve my problem.
So I wrote a little shell script that uses rclone to copy files from a variable folder into my Google Drive.
My problem is that I can't enter the folder name if it contains more than one word. I already tried using read -r folder
but it returns
Command copy needs 2 arguments maximum: you provided 3 non flag arguments: ["One" "Folder/" "Drive:SomeFolder/File"]
and if I use \
it returns
Command copy needs 2 arguments maximum: you provided 3 non flag arguments: ["One\\" "Folder/" "Drive:SomeFolder/File"]
I want the final command to look like this
rclone copy One\Folder/ Drive:SomeFolder/File
#!bin/sh
#upload
echo "Folder Name:"
read -r folder
echo "File Name:"
read -r name
rclone copy ${folder}/ Drive:SomeFolder/${name}