getenv - unix - fp 5.0.13

Bob Stockler bob at trebor.iglou.com
Wed Mar 10 12:01:10 PST 2004


On Wed, Mar 10, 2004 at 08:37:02AM -0800, Enrique Arredondo wrote:
| From: "Bob Stockler" <bob at trebor.iglou.com>
| >
| > The USER command requires:
| >
| >   Then: USER alias = /hard/coded/non-variable/argument-of/program-name
| >   Then: alias      = "query sent to USER program"
| >   Then: ANSWER     = alias ; declare ANSWER
| 
| I tried it but I'm getting the following:
|        Then: user getname="/usr/vsifax/bin/flog"
|        Then: getname="-a"<2
| fetch  . If:
|        Then: answer=getname;declare answer
|        Then: msgbox answer
| Maybe that argument * -a * is killing it right ?

In the first place, you apparently missed the implication
that the program name handed to USER must be non-quoted.

Secondly "-a" < 2 is supposed to be an argument to the
command you're trying to execute, and not a query to it.
That's why I suggested you'd probably need a shell script.
Here's something to start with:

Write this shell script, and make it executable and
readable by all:

  #!/bin/sh
  # Shell Script named "flog"
  # This will loop and read the value for "argument"
  # every time anything is piped into it:
  while read argument
  do /usr/vsifax/bin/flog -a $argument
  done

I think this processing will give you a start on your
output processing table:

         If: NOT Start
       Then: gosub Start ; declare answer
       Then: getname = 2
       Then: answer  = getname
       Then: ' other stuff you want to do with "answer"
       Then; end
  Start  If: ' The USER command must be alone on a line by itself:
       Then: USER getname = /path/to/shell/script/named/flog
       Then: return ' above should be unquoted full absolute pathname

Bob

-- 
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).


More information about the Filepro-list mailing list