HPE GreenLake Administration
Operating System - HP-UX
1838687
Members
6079
Online
110128
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2001 04:48 PM
07-25-2001 04:48 PM
At the risk of getting flamed -
I am working on a script that will allow the DBAs to send multiple files to multiple machines via ftp.
In my .netrc I haved coded 'if' statements for the login and password based on the hostname of the machine they wish to transfer a file. In doing so, though it works fine, an error appears for each 'elif' following the one that met the criteria. Since .netrc likes nothing below the mahine xxx login xxx password xxx line 'exit' even produces the error.
My intent is to reduce the harcoding within ftp scripts and allow one point of change for user or password.
In reading previous posts I have seen the login done within the script and wish to avoid this. I did not see any reference to multiple entries in the .netrc either.
Thanks for any input.
dl
I am working on a script that will allow the DBAs to send multiple files to multiple machines via ftp.
In my .netrc I haved coded 'if' statements for the login and password based on the hostname of the machine they wish to transfer a file. In doing so, though it works fine, an error appears for each 'elif' following the one that met the criteria. Since .netrc likes nothing below the mahine xxx login xxx password xxx line 'exit' even produces the error.
My intent is to reduce the harcoding within ftp scripts and allow one point of change for user or password.
In reading previous posts I have seen the login done within the script and wish to avoid this. I did not see any reference to multiple entries in the .netrc either.
Thanks for any input.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2001 06:35 AM
07-26-2001 06:35 AM
Solution
I am confused as to why you are using 'if' statements in the .netrc file. You can have multiple entries in the .netrc without doing anything fancy. All you do is put each entry on a separate line and ftp, when invoked, when pick up the appropriate entry from the .netrc.
For example:
machine name login uid passwd whatever
machine name1 login uid passwd whatever
machine name2.domain.com login uid2 passwd whatever2
For example:
machine name login uid passwd whatever
machine name1 login uid passwd whatever
machine name2.domain.com login uid2 passwd whatever2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2001 07:42 AM
07-26-2001 07:42 AM
Re: .netrc
Right you are.
Another case of missing the obvious by making something more complicated than need be.
Thanks for straightening me out.
dl
Another case of missing the obvious by making something more complicated than need be.
Thanks for straightening me out.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP