[Gambas-user] Help with SHELL and EXEC

Doriano Blengino doriano.blengino at ...1909...
Fri Oct 10 15:23:26 CEST 2008


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 image and then I write the file names to it's standard
> input. This is what I dont't get working.
>
> I really don't know what the problem is.
>
> on command line this works
>
> ls |xargs genisoimage -o testi.iso
>   
The command line you describe takes all the output from ls and passes it 
as a single command line to "genisoimage -o test.iso". In other words, 
if your current directory contains:

    file1   file2   file3

then your command line results in:

    genisoimage -o testi.iso file1 file2 file3

To do the same thing in gambas, you must construct a string from the 
file you want, then pass it to SHELL, but without opening that process 
for input or output. Or, may be, you want to get its output to see how 
it went, like:

    SHELL "genisoimage blah blah blah" TO whathappened
    taResult.text = whathappened


Regards





More information about the User mailing list