Hi
Through shell script we put a file on remote sever.
After putting file on that server it goes into inbox folder and it appends a hash code to file name. So when getting back the same file from inbox folder it is giving me following error.

/inbox/TESTFILE*: No such file or directory.

Here is my script

#!/bin/sh
FTP_USER='abhay'
FTP_PASS='amp123'
FILE_NAME="TESTFILE"
/usr/kerberos/bin/ftp -vni 192.168.1.322 <<EOC
user $FTP_USER $FTP_PASS
put $FILE_NAME
cd inbox
mget TESTFILE*
quit
bye
EOC

So please help me regarding this.

Thanks
Abhay

Edited 6 Years Ago by abhay_tanu: n/a

Hi
Through shell script we put a file on remote sever.
After putting file on that server it goes into inbox folder and it appends a hash code to file name. So when getting back the same file from inbox folder it is giving me following error.

/inbox/TESTFILE*: No such file or directory.

Here is my script

#!/bin/sh
FTP_USER='abhay'
FTP_PASS='amp123'
FILE_NAME="TESTFILE"
/usr/kerberos/bin/ftp -vni 192.168.1.322 <<EOC
user $FTP_USER $FTP_PASS
put $FILE_NAME
cd inbox
mget TESTFILE*
quit
bye
EOC

So please help me regarding this.

Thanks
Abhay

What's the remote `pwd' when you copy the local file `$FILE_NAME' into it? It can not be `inbox' because you `cd' to it after the fact.

Could you give use an example of what the filename looks like after its been modified.

File name will be like

TESTFILE#P129GDN1326S43

when we put file.

This article has been dead for over six months. Start a new discussion instead.