system noredraw + wget command

Brian K. White brian at aljex.com
Tue Jan 24 17:24:03 PST 2006


----- 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), touch .netrc, 
chmod 600 .netrc

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


Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list