LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Resolving variables in an FTP session (https://www.linuxquestions.org/questions/linux-newbie-8/resolving-variables-in-an-ftp-session-888851/)

gburton 06-28-2011 05:22 PM

Resolving variables in an FTP session
 
I set a variable before entering the FTP session (vDate). Then it does not seem to resolve when I try to use it in the session as part of an mput command. $vDate resolves as an empty value. Can you point me in the right direction?

vDate=`TZ=GMT+24 date +%m-%d-%Y`
ftp -d -n server
quote USER u10004
quote PASS *****
prompt
cd outbound
mput /path/NetworkClick_2870_$vDate.log
bye

droyden 06-28-2011 05:28 PM

Echo the commands to a file then call the file with the define variable in it


All times are GMT -5. The time now is 06:42 PM.