04-05-2001
Thnaks mib, .netrc is work now.
You are the real ghuru.
yups, in my aix there is perl :-)
if you don't mind, can I have the source of your perl ?
10 More Discussions You Might Find Interesting
1. IP Networking
Hi all,
I upgraded my SUSE 6.1 to SUSE 7.1 and at once the following things won't work anymore:
1) My DHCP client is not able anymore to retrieve my IP address from the @home server. It times out all the time. If I use a fixed IP I can get on the net, so there is no physical problem.
2) I... (3 Replies)
Discussion started by: Micky
3 Replies
2. Solaris
guys, need your help~~~~
I am setting up a Sun Enterprise 450 Ultra 4 server
originally I was using Sun solaris 9 1202 version.
but after an accident (i guess becoz i deleted something wrongly), the system cannot boot up.
and now I wana install a FreeBSD(since it is free and it will... (3 Replies)
Discussion started by: MrDJay
3 Replies
3. Shell Programming and Scripting
I've still a little problem with sed.
So, the content of my file.txt is like:
101.10.20.2.1079 > 101.11.2.20.80:
101.10.20.2.1080 > 101.11.2.20.80:
101.10.20.2.1081 > 101.10.20.2..80:
101.05.15.143.1068 > tpo68-96-22-1.no.no.cox.net.4391:
101.05.15.143.1072 >... (5 Replies)
Discussion started by: nymus7
5 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I've got a thorny sed/regex problem and I thought somebody out there might be able to help.
I'd like to use sed in a Makefile to parse a path string. The path might look like this:
case 1: /mnt/users/bob/build/src
or
case 2: /mnt/users/bob/build/src/foo
or
case 3: ... (4 Replies)
Discussion started by: gnarl
4 Replies
5. Shell Programming and Scripting
Surely there's an easier way to do this, lets see if anyone knows! I am new to scripting so go easy on me!
I have the following script and at the moment it doesn't work and I believe the problem is that I am using a while loop within a while loop. When I run the script using sh -x I can see... (6 Replies)
Discussion started by: StevePace
6 Replies
6. Shell Programming and Scripting
Hi all,
It's been a long week and my brain is clearly not functioning right so hopefully someone can help me out here.
I've got a function in a script which just checks if a MySQL database directory exists or not. Code is as follows:
dbCheck2() {
if ;
then {
:
# carry... (4 Replies)
Discussion started by: _Spare_Ribs_
4 Replies
7. UNIX for Dummies Questions & Answers
Hello does anyone know how to do the following using some simple unix if possible:
I have a file with the following info as comma separated. It shows username, id number and all the subjects they are enrolled in on the one line. The subjects are separated by colons.
UserName,ID,Subject... (13 Replies)
Discussion started by: ynneycat
13 Replies
8. UNIX for Dummies Questions & Answers
I just loaded Cygwin on my XP deskop. I am TRYING to install a program that said it needs this program to run. How do I install or run a program? Keep in mind I just started with Unix yesterday:) (1 Reply)
Discussion started by: gss
1 Replies
9. UNIX for Advanced & Expert Users
Good day,
I am trying to run a ssh command on a remote server, but when I run the command the server takes FOREVER... and ends up giving me an error..
then the script also kicks server load up by 100% while it is running..
But if I run the same command on the server it goes pretty quickly and... (3 Replies)
Discussion started by: msullivan
3 Replies
10. Shell Programming and Scripting
Hi,
I am new to shell scripting, but doing my best to learn things. Today doing courses there was exercise like this:
#!/usr/bin/bash
a=$1
b=$2
if ]
then
echo "Conditions are met"
else
echo "Conditions are not met"
fi
I improved it a little, beacuse of curiosity :D to this:
... (8 Replies)
Discussion started by: Rosentine
8 Replies
LEARN ABOUT MOJAVE
net::netrc
Net::Netrc(3pm) Perl Programmers Reference Guide Net::Netrc(3pm)
NAME
Net::Netrc - OO interface to users netrc file
SYNOPSIS
use Net::Netrc;
$mach = Net::Netrc->lookup('some.machine');
$login = $mach->login;
($login, $password, $account) = $mach->lpa;
DESCRIPTION
"Net::Netrc" is a class implementing a simple interface to the .netrc file used as by the ftp program.
"Net::Netrc" also implements security checks just like the ftp program, these checks are, first that the .netrc file must be owned by the
user and second the ownership permissions should be such that only the owner has read and write access. If these conditions are not met
then a warning is output and the .netrc file is not read.
THE .netrc FILE
The .netrc file contains login and initialization information used by the auto-login process. It resides in the user's home directory.
The following tokens are recognized; they may be separated by spaces, tabs, or new-lines:
machine name
Identify a remote machine name. The auto-login process searches the .netrc file for a machine token that matches the remote machine
specified. Once a match is made, the subsequent .netrc tokens are processed, stopping when the end of file is reached or an- other
machine or a default token is encountered.
default
This is the same as machine name except that default matches any name. There can be only one default token, and it must be after all
machine tokens. This is normally used as:
default login anonymous password user@site
thereby giving the user automatic anonymous login to machines not specified in .netrc.
login name
Identify a user on the remote machine. If this token is present, the auto-login process will initiate a login using the specified
name.
password string
Supply a password. If this token is present, the auto-login process will supply the specified string if the remote server requires a
password as part of the login process.
account string
Supply an additional account password. If this token is present, the auto-login process will supply the specified string if the remote
server requires an additional account password.
macdef name
Define a macro. "Net::Netrc" only parses this field to be compatible with ftp.
CONSTRUCTOR
The constructor for a "Net::Netrc" object is not called new as it does not really create a new object. But instead is called "lookup" as
this is essentially what it does.
lookup ( MACHINE [, LOGIN ])
Lookup and return a reference to the entry for "MACHINE". If "LOGIN" is given then the entry returned will have the given login. If
"LOGIN" is not given then the first entry in the .netrc file for "MACHINE" will be returned.
If a matching entry cannot be found, and a default entry exists, then a reference to the default entry is returned.
If there is no matching entry found and there is no default defined, or no .netrc file is found, then "undef" is returned.
METHODS
login ()
Return the login id for the netrc entry
password ()
Return the password for the netrc entry
account ()
Return the account information for the netrc entry
lpa ()
Return a list of login, password and account information fir the netrc entry
AUTHOR
Graham Barr <gbarr@pobox.com>
SEE ALSO
Net::Netrc Net::Cmd
COPYRIGHT
Copyright (c) 1995-1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
perl v5.18.2 2014-01-06 Net::Netrc(3pm)