[CentOS] Using shell variables inside the ftp client

Fri Jul 22 11:12:58 UTC 2011
Ljubomir Ljubojevic <office at plnet.rs>

John R Pierce wrote:
> On 07/21/11 1:52 PM, Always Learning wrote:
>>> I have a script that opens an ftp connection to a non-*nix system.
>>>>  I desire to change directories on the host system using a shell
>>>>  variable to set the cd directory.  However, I cannot seem to
>>>>  discover how this is done.
>> Check the FTP configuration file on the remote server. There might be a
>> block to stop you moving-out of your log-on FTP directory.
> 
> more likely, the ftp program is processing his command lines, and it 
> doesn't know anything about $parameter substitution.
> 
> I suggest using wget or lftp or similar rather than conventional ftp.
> 
> 
> 
+1 for lftp, very scriptable.

-- 

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant