[Gambas-user] Problem with sh

berger at ...102... berger at ...102...
Wed Apr 2 10:56:45 CEST 2003

> Le Mardi 1 Avril 2003 13:06, vous avez écrit :
> > Hello everybody
> >
> > I installed Version 0.52. Before I used gambas 0.42.
> > I got now a problem, if I try to run a sh-script using exec it won't work.
> > Seems like nothing happens. For example:
> > EXEC "sh /home/me/myscript" WAIT
> >
> > It does not matter if the script is executable or not (anyway, shouldn't
> > matter).
> >
> > I also tried if sh work and did
> > EXEC "sc --version > /home/me/output"
> > and I received the version output.
> >
> > Is it possible that I only can execute commands who are in the
> > path-env-variable? I have to execute script from random places so püutting
> > the directory into path would not be good I think.
> >
> > Thank you for any advice
> >
> > regards
> >
> > David
> Hi David,
> When you use EXEC "toto", the interpreter does a "sh toto" behind you. Maybe 
> having "sh" twice in the command line does not work ?
> To run a sh script, try doing EXEC "myscript", by putting #!/bin/sh at the top 
> of your script.

Mh, this does not work either. I tried with #!/bin/sh and #!/bin/bash, make them executable or ot, try with "sh command", "./command" or just "command".
I also tried to put it into the path in my gambas-app (PATH=`echo $PATH`:/home/me/test) before the line I call the script, also do not work

Was anyone able to run a shell script from Gambas? Maybe I di something terribly wrong, but I have no clue what it meight be. Also tested with other scripts, there the same problem. 

> P.S. I prefer when people post on the mailing-list, because it is archived, 
> and so problems and solution are accessible to others.

Ups, excusez moi, I took the wrong E-Mail-Adress, I'll write on the list in future of course.

More information about the User mailing list