Accessing a "c" program value from a csh script

Wes Barris wes at uh.msc.umn.edu
Sat Sep 22 02:39:16 AEST 1990


I have a "c" program that returns an integer value.  How does one run this
program from within a csh script and access the returned value?  I have
tried various forms of the following lines with no luck.

#!/bin/csh
#
#  NOTE: WF_DIR is an environment variable.
#
set intro_data = "data"
@ nobjs = `"$WF_DIR/lbin/read_intro $intro_data"`




When run, this script yields the following error message on a Sun4-280:

/usr/local/wave/lbin/read_intro data: Command not found.

If I change the csh line to the following, it runs properly but does not
(of course) return the integer value.

$WF_DIR/lbin/read_intro $intro_data

Does anyone know what's the deal?


      o o o o o o o . . .   ________________________________ _____=======_____
    o      _____            |Wes Barris                    | | wes at msc.edu   |
  .][__n_n_|DD[  ====_____  |Minnesota Supercomputer Center| |(612) 626-1854 |
 >(________|__|_[_________]_|University of Minnesota_______|_|_FAX:_624-6550_|_
 _/oo OOOOO oo`  ooo   ooo  'o^o^o                    o^o^o` 'o^o         o^o`
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
God helps them that help themselves. -- Benjamin Franklin



More information about the Comp.unix.shell mailing list