[Gambas-user] More Problems with SHELL (possible BUG).

Benoit Minisini gambas at ...1...
Fri Jul 6 10:02:29 CEST 2007


On vendredi 06 juillet 2007, audiossis wrote:
> Incidentally,
>
> > you have to do:
> > SHELL "pushd /directory; find ./ | cpio -vco | gzip >
> > /path/to/archive/file "
>
> Acheives nothing. Leaving a space at the end of the string appears to have
> no effect whatsoever. The command works wether the white space is there or
> not, but doing:
>
> SHELL "pushd /directory; find ./ | cpio -vco | gzip > /path/to/archive/file
> " WAIT FOR READ
>
> only returns the output from "pushd" and not "cpio". Mind you I can't get
> the output from "cpio" at any time wether it is preceded with the "pushd"
> command or not. :-)
>
>
> Ben
>

You must do:

SHELL "pushd /directory; find ./ | cpio -vco | gzip > /path/to/archive/file 
2>&1" WAIT FOR READ

If you don't add "2>&1" to each shell command, so that the standard error 
output is redirected to the standard output, then you won't get the standard 
error output data in the 'Read' event handler.

Or you can use the 'Error' event to catch the standard error output directly.

Regards,

-- 
Benoit Minisini




More information about the User mailing list