Article View: comp.unix.shell
Article #1201Accessing a "c" program value from a csh script
From: Wes Barris
Date: Fri, 21 Sep 1990 16:39
Date: Fri, 21 Sep 1990 16:39
33 lines
1634 bytes
1634 bytes
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@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
Technical Details
Message-ID:
<2629@uc.msc.umn.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uc!uh.msc.umn.edu!wesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uc!uh.msc.umn.edu!wes From: wes@uh.msc.umn.edu (Wes Barris) Newsgroups: comp.unix.shell Subject: Accessing a "c" program value from a csh script Message-ID: <2629@uc.msc.umn.edu> Date: 21 Sep 90 16:39:16 GMT Sender: news@uc.msc.umn.edu Reply-To: wes@msc.edu Organization: Minnesota Supercomputer Center Lines: 33