A Person ha scritto:
> Good Day . . .
>
> I am using Gambas 2.8.2-1ubuntu1.
>
> I wrote a program that randomly displays a line from a text file. The 
> code worked in pure Gambas but then I tried to improve it! (Ho Ho Ho)
>
> I searched around and I came up with and modified an executable BASH 
> script (test.sh) that worked substantially faster than my code so I 
> tried to incorporate it into the source code.
>
> During my testing I continuously ran tests in a terminal and 
> everything worked perfectly with the script. I tried it in my code using
>
> ## EXEC ["~/test.sh"] to sOutPut or EXEC ["~/./test.sh"] to sOutPut
>
> and nothing worked. sOutPut was always "".
>
> The attached tar file contained a small program that contains an 
> example EXEC problem code. A modified test.sh script is included along 
> with a dummy data file, words.txt.
>
> Any ideas about the EXEC problem?
Hi, "A person"...

read about the EXEC statement. You need to specify the WAIT clause, 
otherwise your script is launched in background, and gambas goes ahead 
without waiting for your script to output anything - so sOutput remains 
empty.

Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to