system noredraw + wget command

Enrique Arredondo henry at vegena.net
Wed Jan 25 08:23:27 PST 2006


----- Original Message ----- 
From: "Brian K. White" <brian at aljex.com>
To: <filepro-list at lists.celestial.com>
Sent: Tuesday, January 24, 2006 5:24 PM
Subject: Re: system noredraw + wget command


>
> ----- Original Message ----- 
> From: "Enrique Arredondo" <henry at vegena.net>
> To: <filepro-list at lists.celestial.com>
> Sent: Tuesday, January 24, 2006 2:35 PM
> Subject: system noredraw + wget command
>
>
>> I'm running this command so I can get information from remote Customers 
>> but every time the report runs it gives me an error on the screen but 
>> then it keeps doing it's job, what is that all about ?
>>
>> Then : aaa="umask 0;"
>> Then : aab="/usr2/tmp/gotit"
>> Then : system noredraw aaa<"wget -q -O"<aab<"http://bla..asp?serial=123"
>>
>>
>>                           Records Selected:         8
>>
>>                          Generating Output:         0 wget: Cannot read 
>> /usr2/user/.netrc (Permission denied).
>>
>>
>> If I run this from the command line I don't get the error. Is it 
>> filepro's permissions ? Should I just do a "chmod 777 .netrc" ?
>
> NOOO. If .netrc is anything other than 600, then those programs that use 
> it will ignore it.
>
> It probably means that user filepro has no .netrc in it's home directory.
> su filepro, cd /usr/filepro (or wherever filepro's home is),

# su filepro
Password has expired.
Setting a new password cannot be done from here.    (???) I shouldn't care , 
right ?

filepro:x:778:50:*filepro:/usr2/appl/fp:/bin/ksh
# cd /usr2/appl/fp

 touch .netrc,
> chmod 600 .netrc
>

# chown filepro .netrc
done


> or just add a 2>/dev/null to the end of the system command to ignore 
> stderr
>
> Also I'd quote urls in general since they often have ? and & and other 
> special characters in them that the shell may act on.
> Even if you think this particular one happens to be working ok right now.
>
>> Then : system noredraw 
>> aaa<"wget -q -O"<aab<"\"http://bla..asp?serial=123\""
>
>
> or use curl instead, which doesn't look at .netrc unless you go out of 
> your way to tell it to with command line options
>
>> Then : system noredraw aaa<"curl -s \"http://bla..asp?serial=123\" >"<aab
>

NICE!, it works as well and it has a huge help on the man pages!.

Thanks 



More information about the Filepro-list mailing list