- 论坛徽章:
- 0
|
各位大侠,如何在linux下ftp传输调用变量值
如:
#test=/tmp/1.txt
#echo $test
/tmp/1.txt
#ftp 192.168.1.1
Connected to 192.168.1.1.
220 ready, dude (vsFTPd 1.1.0: beat me, break me)
Name (192.168.1.1:root):
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put $test ./
local: $test remote: ./
ftp: local: $test: No such file or directory
我想应该是在ftp下不能调用$test从而不知道要传输的其实是这个变量指定的/tmp/1.txt文件,而把“$test”当成是要传输的文件名了。
请问各位大侠如何实现?谢谢! |
|