I have an ftp user, which has been setup to run ftp jobs to a specific machine (different jobs). for the first job i created .netrc in the ftp users home directory and added the appropriate commands
machine FTPBOX01 login user1 password xxx
macdef init
etc
etc
get file
bye
I use the command 'ftp FTPBOX01' in my shell script to call the entry for that machine in my .netrc file
However, I need this user to be able to run different jobs but on the same machine , for example my .netrc file would look something like this:
machine FTPBOX01 login user1 password xxx
macdef init
etc
etc
get file
bye
machine FTPBOX01 login user2 password xxx
macdef init
etc
etc
get another file
bye
however, because i am using the 'ftp FTPBOX01' command it cant dtermine which job to run it just gets the first matching entry in .netrc (ie the top one)
How can specify from within my shell script which job i want to run, somebody has suggested that i create a different ftp user with its own .netrc file, but this is not an option as there will possibly be hundreds of jobs to the same machine
Any help on this would be greatly appreciated
Thanks and regards
Gary