Or, you can follow your command with ; echo $?

Like this:

   2!:0 'cc; echo $?'

Note that this won't work on windows, but should work on systems that have
cc

Thanks,

-- 
Raul



On Fri, Mar 21, 2014 at 7:24 AM, bill lam <[email protected]> wrote:

> 2!:0 will return error if return code is non-zero. You can test
> your command in a shell and see what the error code will be.
>
> Пт, 21 мар 2014, kamakura писал(а):
> > Hello there!
> >
> > I have a question about usage of 2!:0 (invoking a unix command).
> > Sometimes I come across an error as follows:
> >
> >     2!:0'pwd'
> > /Applications/j64-801/bin
> >     2!:0'cc'
> > |interface error
> > |       2!:0'cc'
> >
> >
> > It seems that 2!:0 does not work properly.
> >
> > Toshinari Kamakura
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to