exec not working

Post Reply
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

exec not working

Post 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.
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

exec not working

Post 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.
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

exec not working

Post by aitchon »

How would I run an exec for the following shell command?

gunzip <123.gz >|123.xml
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

exec not working

Post by mark »

<exec fromfile="123.gz" tofile="123.xml" "gunzip"></exec>

or

<exec "/bin/sh" "-c" "gunzip <123.gz >123.xml"></exec>
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

exec not working

Post by aitchon »

Thanks!
Post Reply