USER (was Re: exists or similar command to work like grep on file system files)

Kenneth Brody kenbrody at spamcop.net
Thu Feb 13 12:30:33 PST 2014


On 2/13/2014 12:45 PM, James Flanagan wrote:
> ARGGHH!  I am an idiot.  I did not know of the USER command until
> yesterday, and all the while, i have a global variable USER in my code.
> needless to say, once i changed the name of the global variable, the
> command does not result in an error and actually works.
>
> Ken, I apologize for wasting your time on that matter.
>
> Now that I have the command working properly, is this possible, where i
> could define the PATHNAME (or more specifically, an argument) to the
> command?  If so, I am home free.
>
> ::qv="/flantec/scripts/findphoto"<qx:
> ::user kenbrody = (qv):
>
> So Far i have not been able to get this to work.  Thank you all very
> much
[...]

filePro currently requires that the command be specified on the USER line, 
and doesn't take any variables.

You could pass the variable to the program.  Using your example:

     user prog = /flantec/scripts/findphoto
     prog = qx      ' Pass the filename to the script
     result = prog  ' Get the result back

Then, the script would then read the name from stdin, rather than the 
command line.

     while read name
     do
         # The "real work" goes here.
     done

-- 
Kenneth Brody


More information about the Filepro-list mailing list