Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Doriano Blengino
Benoit Minisini ha scritto: > > OK, I think I have understoood. The behaviour is normal (except the 'bad file > descriptor' error message). > > Try that in a shell: > > $ cat | tr "a-z" "A-Z" > tr.out > > This is an equivalent of what you tried to do in your program. Some things > are > sent to

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Benoit Minisini
On dimanche 12 octobre 2008, Benoit Minisini wrote: > On dimanche 12 octobre 2008, Doriano Blengino wrote: > > Tell me what your tests say to you - this is very interesting because I > > did not try if that book was true or not. > > Strange behaviours. > > If I replace INPUT OUTPUT by READ WRITE, t

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Benoit Minisini
On dimanche 12 octobre 2008, Kari Laine wrote: > On Sun, Oct 12, 2008 at 4:31 PM, Benoit Minisini < > > [EMAIL PROTECTED]> wrote: > > On dimanche 12 octobre 2008, Doriano Blengino wrote: > > > Tell me what your tests say to you - this is very interesting because I > > > did not try if that book was

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Kari Laine
On Sun, Oct 12, 2008 at 4:31 PM, Benoit Minisini < [EMAIL PROTECTED]> wrote: > On dimanche 12 octobre 2008, Doriano Blengino wrote: > > > > Tell me what your tests say to you - this is very interesting because I > > did not try if that book was true or not. > > > > Strange behaviours. > > If I rep

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Benoit Minisini
On dimanche 12 octobre 2008, Doriano Blengino wrote: > > Tell me what your tests say to you - this is very interesting because I > did not try if that book was true or not. > Strange behaviours. If I replace INPUT OUTPUT by READ WRITE, the process does not write to its standard output anymore.

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Benoit Minisini
On dimanche 12 octobre 2008, Doriano Blengino wrote: > Benoit Minisini ha scritto: > > May be I am wrong... but it seems to me that you are sometimes critic > when replying to me. I know, I am more critic than the average users on > this list, so we are paired... > Don't worry, I'm not "critic" at

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Doriano Blengino
Benoit Minisini ha scritto: May be I am wrong... but it seems to me that you are sometimes critic when replying to me. I know, I am more critic than the average users on this list, so we are paired... On dimanche 12 octobre 2008, Doriano Blengino wrote: Benoit Minisini ha scritto: On dimanch

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Kari Laine
> I attach the project, which uses "tr" as filter. > Run it, then click ToggleButton1; in the gambas console you will see what > the program sends to tr, and in the textarea you will see what tr replies > back to the program. > > Cheers. > > Thank You very much! Best Regards Kari Laine ---

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Benoit Minisini
On dimanche 12 octobre 2008, Doriano Blengino wrote: > Benoit Minisini ha scritto: > > On dimanche 12 octobre 2008, Doriano Blengino wrote: > >> Kari Laine ha scritto: > >> > >> If you look carefully at the docs about EXEC: > >> > >> [ _Process_ *=* ] *EXEC* _Command_ [ *WAIT* ] [ *FOR* { { *READ

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Doriano Blengino
Benoit Minisini ha scritto: > On dimanche 12 octobre 2008, Doriano Blengino wrote: > >> Kari Laine ha scritto: >> >> If you look carefully at the docs about EXEC: >> >> [ _Process_ *=* ] *EXEC* _Command_ [ *WAIT* ] [ *FOR* { { *READ* | >> *INPUT* } | { *WRITE* | *OUTPUT* } } ] [ *AS* _Nam

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Benoit Minisini
On dimanche 12 octobre 2008, Doriano Blengino wrote: > Kari Laine ha scritto: > > I got interested this writing process input thing. I can read process > > output without problem. Although it seems that reading of the stdout will > > start only when process ends. I made a little filter program in C

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-12 Thread Doriano Blengino
Kari Laine ha scritto: I got interested this writing process input thing. I can read process output without problem. Although it seems that reading of the stdout will start only when process ends. I made a little filter program in C and a gambas project to try to use it but I can not get the wrr

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-11 Thread Kari Laine
On Sat, Oct 11, 2008 at 12:02 PM, Olivier Cruilles <[EMAIL PROTECTED] > wrote: > Hello, > > Maybe sommethink like that, > > cd /var/spool/news; tar cf - ./* | gzip -c > files.tar.gz ; echo > "files.tar.gz" > filelist ; genisoimage -o img.iso -path-list filelist > > But if the name of the 'files

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-11 Thread Olivier Cruilles
Hello, Maybe sommethink like that, cd /var/spool/news; tar cf - ./* | gzip -c > files.tar.gz ; echo "files.tar.gz" > filelist ; genisoimage -o img.iso -path-list filelist But if the name of the 'files.tar.gz' doesn't change, you can do it before this command one thing. Olivier. Le 11 o

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Doriano Blengino
Kari Laine ha scritto: > Thank you all for instructions. Key point is that I did not understand how > the OS-shell handles arguments. > I cannot pass all the arguments to shell because they outnumber the limit > which I think is something round 32000. > I am writing a backup program and /var/spool/

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread M0E Lnx
How about just making a string of the files you want to put in the iso and parse that string to the genisoimage dim sArgs as string SHELL "ls " & /path/to/your/files to sArgs SHELL "cd " & /path/to/your/files " & "; genisoimage -o test.iso " & trim(sArgs) wait END On Fri, Oct 10, 2008 at 12:

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Ron
Kari Laine schreef: > Thank you all for instructions. Key point is that I did not understand how > the OS-shell handles arguments. > I cannot pass all the arguments to shell because they outnumber the limit > which I think is something round 32000. > I am writing a backup program and /var/spool/new

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Kari Laine
Thank you all for instructions. Key point is that I did not understand how the OS-shell handles arguments. I cannot pass all the arguments to shell because they outnumber the limit which I think is something round 32000. I am writing a backup program and /var/spool/news directory (leafnode) is givi

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Ron_1st
On Friday 10 October 2008, Kari Laine wrote: > On Fri, Oct 10, 2008 at 2:09 PM, Benoit Minisini < > [EMAIL PROTECTED]> wrote: > > > On vendredi 10 octobre 2008, Kari Laine wrote: > > > > Did you look at the "Console" example? > > > > Hi, thanks had a look it at now. > > I am trying to use genisoi

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Doriano Blengino
Kari Laine ha scritto: > I am trying to use genisoimage. Problem I think is that it exists straight > away after shell is executed so that it is not round when I try to write > (print) to process handle. > What I would need in my program is that I start genisoimage to output > certain iso-file imag

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Kari Laine
On Fri, Oct 10, 2008 at 2:09 PM, Benoit Minisini < [EMAIL PROTECTED]> wrote: > On vendredi 10 octobre 2008, Kari Laine wrote: > > Did you look at the "Console" example? > > Hi, thanks had a look it at now. I am trying to use genisoimage. Problem I think is that it exists straight away after shell

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Kari Laine
On Fri, Oct 10, 2008 at 2:15 AM, Laurent Carlier <[EMAIL PROTECTED]>wrote: > Le vendredi 10 octobre 2008 01:05:57 Kari Laine, vous avez écrit : > > Hi, > > > > could someone please post an example how to use SHELL and EXEC so that > > WRITE is used to write information to external program's input?

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-10 Thread Benoit Minisini
On vendredi 10 octobre 2008, Kari Laine wrote: > On Fri, Oct 10, 2008 at 2:15 AM, Laurent Carlier <[EMAIL PROTECTED]>wrote: > > Le vendredi 10 octobre 2008 01:05:57 Kari Laine, vous avez écrit : > > > Hi, > > > > > > could someone please post an example how to use SHELL and EXEC so that > > > WRIT

Re: [Gambas-user] Help with SHELL and EXEC

2008-10-09 Thread Laurent Carlier
Le vendredi 10 octobre 2008 01:05:57 Kari Laine, vous avez écrit : > Hi, > > could someone please post an example how to use SHELL and EXEC so that > WRITE is used to write information to external program's input? > > I would be very great full. I have tried now four hours and can't get it > workin

[Gambas-user] Help with SHELL and EXEC

2008-10-09 Thread Kari Laine
Hi, could someone please post an example how to use SHELL and EXEC so that WRITE is used to write information to external program's input? I would be very great full. I have tried now four hours and can't get it working. Best Regards Kari Laine ---