"ls" with wildcard doesn't work either ? lftp [email protected]:~/files> ls drwxr-xr-x 2 root root 4096 Oct 8 13:01 . drwx------ 45 stucky stucky 4096 Oct 8 13:01 .. -rw-rw-r-- 1 stucky stucky 6 Oct 8 11:21 SCEA_FR1.csv -rw-rw-r-- 1 stucky stucky 6 Oct 8 11:22 SCEA_FR2.csv -rw-rw-r-- 1 stucky stucky 6 Oct 8 11:22 SCEA_FR3.csv -rw-rw-r-- 1 stucky stucky 16 Oct 8 02:12 SCEA_FR_up.csv -rw-r--r-- 1 root root 10 Oct 8 11:47 file.csv lftp [email protected]:~/files> ls *.csv ls: Access failed: No such file (*.csv) lftp [email protected]:~/files>
This seems to be getting worse. I can't help feeling there is something else missing ? Any help would be appreciated. On Thu, Oct 8, 2009 at 12:44 PM, stucky <[email protected]> wrote: > More bad examples for mget. It appears using the * wildcard screws up > logging entirely : > > > [ast...@hannah ~]$ /usr/bin/lftp -e 'set cmd:verbose yes; set > net:max-retries 3; ; set sftp:connect-program /usr/bin/ssh -i > /oracle/10g/admin/scripts/dev_test/id_dsavito; mget *.csv; bye;' -u user,xx > sftp://my.host.com:23 > *.csv: no files found > [ast...@hannah ~]$ /usr/bin/lftp -e 'set cmd:verbose yes; set > net:max-retries 3; ; set sftp:connect-program /usr/bin/ssh -i > /oracle/10g/admin/scripts/dev_test/id_dsavito; mget file.csv; bye;' -u > user,xx sftp://my.host.com:23 > mget: Login failed: Login incorrect > [ast...@hannah ~]$ rpm -q lftp > lftp-3.5.1-2.fc6 > [ast...@hannah ~]$ > > This is RHEL5 now. > The problem is i pointed it to a non existing key but only "mget file.csv" > writes the correct error whereas "mget *.csv" writes a totally misleading > error which makes you think it logged on but couldn't find the files when it > didn't even log in at all. > > Am I missing something here ? How do you guys deal with that ? > > > > On Thu, Oct 8, 2009 at 11:38 AM, stucky <[email protected]> wrote: > >> Are any of the exit codes working correctly ? >> It appears mget doesn't work but get does. >> Why do they differ ? >> >> [cfern...@redford dev_test]$ /usr/bin/lftp -e 'set cmd:verbose yes; set >> net:max-retries 3; ; set sftp:connect-program /usr/bin/ssh -i >> /oracle/10g/admin/scripts/dev_test/id_dsa; mget *.ccsv; bye;' -u user,xx >> sftp://my.host.com:23 >> *.ccsv: no files found >> [cfern...@redford dev_test]$ echo $? >> 0 >> [cfern...@redford dev_test]$ /usr/bin/lftp -e 'set cmd:verbose yes; set >> net:max-retries 3; ; set sftp:connect-program /usr/bin/ssh -i >> /oracle/10g/admin/scripts/dev_test/id_dsa; get file.ccsv; bye;' -u user,xx >> sftp://my.host.com:23 >> get: Access failed: No such file (file.ccsv) >> [cfern...@redford dev_test]$ echo $? >> 1 >> [cfern...@redford dev_test]$ rpm -q lftp >> lftp-3.0.6-4.el4 >> >> It's very hard to use lftp for automated processes this way. >> Has this been address in later version ? I'm still on rhel4. >> >> >> >> On Thu, Oct 8, 2009 at 2:25 AM, Sorin Sbarnea <[email protected]>wrote: >> >>> I found a similar limitation that does prevent me from using the >>> script in automaton in a proper way. >>> I cannot know from the returned code if the error is a permanent error >>> or a temporary error. For some errors retry will work: server busy, >>> concurrent access limitations but others are permanent like: login >>> denied for bad user/password. >>> >>> Also I found out that exit codes are not documented :( >>> >>> -- >>> /sorin >>> http://nusunt.eu >>> >>> On Thu, Oct 8, 2009 at 09:00, stucky <[email protected]> wrote: >>> > Support >>> > >>> > Why does lftp exit with 0 here when it found no file to upload ? >>> > >>> > [cfern...@redford dev_test]$ /usr/bin/lftp -e 'set cmd:verbose yes; >>> set >>> > net:max-retries 3; mput SCEA_FR_up.csv; exit;' -u user,xx >>> > sftp://my.host.com:23 >>> > SCEA_FR_up.csv: no files found >>> > [cfern...@redford dev_test]$ echo $? >>> > 0 >>> > [cfern...@redford dev_test]$ >>> > >>> > How can I capture the correct exit code from mput ? >>> > >>> > Thanks for your help >>> > -- >>> > stucky >>> > >>> >> >> >> >> -- >> stucky >> > > > > -- > stucky > -- stucky
