Page 1 of 1

exec not working

Posted: Mon Jan 24, 2011 1:36 pm
by aitchon
I'm trying to run this command:
<exec "/usr/bin/killall texis"></exec>

but I get this error:
<!-- 018 killtexis:34: Cannot exec `/usr/bin/killall texis': No such file or directory in the function doexec -->

I verified that this is the correct location for killall.

exec not working

Posted: Mon Jan 24, 2011 2:24 pm
by mark
Try
<exec "/usr/bin/killall" "texis"></exec>

First non-option parameter is program to run. Remaining are arguments passed to that program. Arguments are not passed via a shell so it's safe to use special characters etc. For those who care <exec> uses library call exec(), not system() on *nix.

exec not working

Posted: Tue Aug 28, 2012 12:51 pm
by aitchon
How would I run an exec for the following shell command?

gunzip <123.gz >|123.xml

exec not working

Posted: Tue Aug 28, 2012 2:09 pm
by mark
<exec fromfile="123.gz" tofile="123.xml" "gunzip"></exec>

or

<exec "/bin/sh" "-c" "gunzip <123.gz >123.xml"></exec>

exec not working

Posted: Tue Aug 28, 2012 2:15 pm
by aitchon
Thanks!