It appears the problem was the the $HOME variable. I did the env and sys
command in the Oracle Enterprise manager and it pointed to the oracle $HOME
instead of the dba $HOME.
Thanks for the help.
Bill
-----Original Message-----
From: Bill Brown
Sent: Thursday, March 01, 2001 12:52 PM
To: '[EMAIL PROTECTED]'
Subject: RE: ? .netrc operations in shell script produce different
results
Thanks for the advice. The users are the same in this case.
The user has environment variable set-up for HOME and is pointing to the
correct location.
When the job is submitted from the Oracle Enterprise Manager id do a ps -efa
to show what is running.
It shows the script name itest.sh and the wget command as seen below.
Any other ideas to try?
Output to ps -efa
dba 25629 25625 0 12:39:17 ? 0:00 wget --continue --tries=inf -r
--glob=on --no-directories -oout.txt ftp://ftp.123.com:21/.cdra/peak/
dba 25625 25624 0 12:39:17 ? 0:00 sh /u10/user/dba/ifsrun/itest.sh
Thanks in Advance.
Bill
-----Original Message-----
From: Hack Kampbjørn [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 12:11 PM
To: Bill Brown
Cc: [EMAIL PROTECTED]
Subject: Re: ? .netrc operations in shell script produce different
results
Bill Brown wrote:
>
> I have a script that does the following
>
> wget --continue --tries=inf -r --glob=on --no-directories -oout.txt
> ftp://ftp.123.com/.cdra/peak/
>
> Running wget -V GNU Wget 1.5.3 on Sun Solaris 8
Note that the lastest version of wget is 1.6. Avaible from the web-site
http://sunsite.dk/wget
>
> Execute wget in a shell script from a telnet window it works fine. The
> .netrc login file is found and thing work fine.
>
> --11:41:23-- ftp://ftp.123.com:21/.cdra/peak/
> => `.listing'
> Connecting to ftp.123.com:21... connected!
> Logging in as west ... Logged in!
> ==> TYPE I ... done. ==> CWD .cdra/peak ... done.
> ==> PORT ... done. ==> LIST ... done.
>
> 0K ->
>
> 11:41:26 (871.09 KB/s) - `.listing' saved [892]
>
> Removed `.listing'.
> --11:41:26-- ftp://ftp.123.com:21/.cdra/peak/20010228.ca
> => `20010228.ca'
> ==> CWD not required.
> ==> PORT ... done. ==> REST 3172 ... done.
> ==> RETR 20010228.ca ... done.
> Length: 3,172 [0 to go]
>
> 0K -> ,,,
> [100%]
>
> The same shell script through Oracle Enterprise manager it doesn't seem to
> find the .netrc and tries to log on as anonymous...
from the info pages:
Besides `.wgetrc' is the "main" initialization file, it is
convenient to have a special facility for storing passwords. Thus
Wget
reads and interprets the contents of `$HOME/.netrc', if it finds it.
You can find `.netrc' format in your system manuals.
So the questions is under which user does the Oracle Enterprise Manager
run your script (what does `whoami' say). Or more precisely what is
$HOME set to?
If the Oracle Manager is running under another user you may have a
similiar problem with your .wgetrc file. Consider using a the global
one.
>
> --11:34:20-- ftp://ftp.123.com:21/
> => `.listing'
> Connecting to ftp.123.com:21... connected!
> Logging in as anonymous ...
> The server refuses login.
> Retrying.
>
> --11:34:20-- ftp://ftp.123.com:21/
> (try: 2) => `.listing'
> Connecting to ftp.123.com:21... connected!
> Logging in as anonymous ...
> The server refuses login.
> Retrying.
>
> --11:34:21-- ftp://ftp.123.com:21/
> (try: 3) => `.listing'
> Connecting to ftp.123.com:21... connected!
> Logging in as anonymous ...
> The server refuses login.
> Retrying.
>
> Can anyone shed some light on this problem? At first I thought it was
> because of the .cdra in the path name. Now I am not sure at all.
> Would love some advise on the best way to debug this problem.
>
> Regards,
>
> Bill Brown
--
Med venlig hilsen / Kind regards
Hack Kampbjørn [EMAIL PROTECTED]
HackLine +45 2031 7799