![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copying multiple folders to local machine (don't know folder names) | leenyburger | UNIX for Dummies Questions & Answers | 5 | 06-12-2008 07:38 AM |
| multiple IP adresses on one machine | scarfake | UNIX for Dummies Questions & Answers | 4 | 06-04-2008 07:11 AM |
| comment jobs in cron for multiple accounts | shibajighosh | AIX | 3 | 04-08-2008 10:52 AM |
| using .netrc | sveera | UNIX for Advanced & Expert Users | 6 | 03-26-2008 04:58 PM |
| background jobs exit status and limit the number of jobs to run | GrepMe | Shell Programming and Scripting | 1 | 06-11-2007 06:56 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
.netrc multiple ftp jobs to same machine
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 ![]() |
|
||||
|
Perderabo
That sounds great, i presume with this method, that everything is self contained within the script and .netrc is totally bypassed. However i am slightly confused over the following lines exec 4>&1 ftp -nv >&4 2>&4 |& what exactly is going on here ? Thanks Gary |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|