in ftp, put put *`date '+%Y%m%d'` doesn't work

in ftp, put put *`date '+%Y%m%d'` doesn't work

Post by James Nedha » Thu, 20 Jan 2000 04:00:00



In ftp I want to put a file from that ends in the current yyyymmdd.  eg.
filename_20000119 would be a the filename I want to put as it has the
current date (when I wrote this message) Using the following doesn't
work, any ideas?

put *_`date '+%Y%m%d'`

 
 
 

in ftp, put put *`date '+%Y%m%d'` doesn't work

Post by Heiner Steve » Thu, 20 Jan 2000 04:00:00



> In ftp I want to put a file from that ends in the current yyyymmdd.  eg.
> filename_20000119 would be a the filename I want to put as it has the
> current date (when I wrote this message) Using the following doesn't
> work, any ideas?

> put *_`date '+%Y%m%d'`

Command substitution (the part between the single quotes `..`) is
done by the shell. You cannot use this syntax from the FTP client
prompt.

Even If you wrote the date string by yourself, you should use
"mput" instead of "put":

        mput *_20000119

Heiner
--
 ___ _                          

\__ \  _/ -_) V / -_) ' \    UNIX Shell Script Programmers: visit
|___/\__\___|\_/\___|_||_|   http://www.oase-shareware.org/shell/

 
 
 

1. in ftp, put put *`date '+%Y%m%d'` doesn't work

In ftp I want to put a file from that ends in the current yyyymmdd.  eg.

filename_20000119 would be a the filename I want to put as it has the
current date (when I wrote this message) Using the following doesn't
work, any ideas?

put *_`date '+%Y%m%d'`

2. 2.4 running out of swap space

3. SSH on 2.7

4. Slow FTP 'gets', Fast 'puts'???

5. some info on education

6. FTP: logging things other than 'get' and 'put'

7. AsRock K7S8X: PCI doesn't work with SuSE 8.1

8. Slackware 1.1.2 smail doesn't put 'Recieved:' header in email

9. 'put' files from unix to VMS via batch ftp.

10. FTP 'put' file permissions

11. Set umask of FTP 'put'

12. FTP file transfer slow with 'put' command