[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
interfacing octave with tcsh
From: |
John W. Eaton |
Subject: |
interfacing octave with tcsh |
Date: |
Fri, 09 Nov 2007 19:38:43 -0500 |
On 9-Nov-2007, Dr. Aaron Herrnstein wrote:
| I am experiencing difficulties when using an octave script to define a shell
| variable via command line substitution (ie, the backquote character) in the
| tcsh and csh shells. The following example works properly in CentOS, but
| triggers the errors listed below in Fedora and Cygwin. I would appreciate
| any suggestions you can offer.
|
| % cat > ./octprint.m << EOF
| #!/usr/bin/octave -q
| fprintf('%d', 5)
| EOF
| %
| % chmod u+x ./octprint.m
| %
| % @ atvar = `./octprint.m`
| @: Expression Syntax.
| %
| % set setvar = `./octprint.m`
| % echo $setvar
| echo: No match.
So precisely what is Octave printing when you run this script? Have
you tried
./octprint.m | od -c
or
set setvar = `./octprint.m`
echo "$setvar"
or
set nonomatch
set setvar = `./octprint.m`
echo $setvar
?
Are you using the same version of Octave in each case?
Anyway, this seems more like a shell scripting question than a
question about Octave.
jwe