Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expressions within FTP command syntax....

Status
Not open for further replies.

hd7106

Programmer
Nov 27, 2002
21
US
Hi!

As I started creating entries within .netrc file to automate the FTP process, I ran into a roadblock.

The name of the file I will FTP on the daily basis precedes with the current-date e.g. Jan122004-filename.zip.

How can I pass a variable filename entry with "put" command within .netrc file?

The other question I have is what is the difference between these two entries (!cd and lcd)within .netrc file?

machine ............
login .....
password ......
!cd /usr/lib
lcd /usr/lib
..
...
bye

Thanks,
hd7106
 
Hi!

I believe I may have figured this out.

I created a shell script to dynamically make entries to $HOME/.netrc file. I pick up the file name by setting the variable to `date +%a_%b%d%Y`.zip. I use $<var> with FTP's &quot;put&quot; command and write it to .netrc file.

Although, I have run into a roadblock, not being able to access the FTP site. But will test the script as soon as I get the correct IP address details.

hd7106
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top