On 5/18/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
Is there anyway to pass a flag to jconsole that tells it to exit after
executing all the commands in the script?
Sure.
For example, consider this script;
9!:29]1[9!:27'exit 1'
echo 2{::ARGV
echo 3{::ARGV
exit 0
If you pass it two extra arguments, it will display them an exit
with a success exit code. If not it will exit with a failure
exit code.
For example, from bash:
if ./jconsole user/example.ijs a b; then echo ok; else echo not; fi
will display:
a
b
ok
assuming user/example.ijs is the above script, and your current
directory is the j601 directory. On the other hand,
if ./jconsole user/example.ijs a; then echo ok; else echo not; fi
will display
a
not
If you don't use a command line environment much, this might
not matter to you. But if you don't use a command line environment
much I would not bother with writing J programs for use from the
command line.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm