hi there,
i am trying to make a script in which i can drag a file (with spaces in file name :p) and it will scp the file to another computer
my code is
echo "--------------------------------------------"
echo "drag file now"
echo "--------------------------------------------"
read "file"
echo "$file"
v="scp ""$file"" prince:/home/prince"
echo $v
$v
echo "press any key and hit enter to terminate"
read buffer
i am getting
[root@localhost lucifer]# '/home/lucifer/Scripts/fast_scp.sh'
--------------------------------------------
--------------------------------------------
drag file now
--------------------------------------------
'/home/lucifer/Downloads/Oasis - Wonderwall (Tyler Ward Acoustic Cover).webm'
'/home/lucifer/Downloads/Oasis - Wonderwall (Tyler Ward Acoustic Cover).webm'
scp '/home/lucifer/Downloads/Oasis - Wonderwall (Tyler Ward Acoustic Cover).webm' prince:/home/prince
root@prince's password:
'/home/lucifer/Downloads/Oasis: No such file or directory
-: No such file or directory
Wonderwall: No such file or directory
(Tyler: No such file or directory
Ward: No such file or directory
Acoustic: No such file or directory
Cover).webm': No such file or directory
press any key and hit enter to terminate
s
[root@localhost lucifer]#
any body please help me out to get this going, i am kinda noob in shell scripting.