[Gambas-user] Gambas-user Digest, Vol 14, Issue 7

audiossis audiossis at ...867...
Fri Jul 6 14:15:41 CEST 2007


On Friday 06 July 2007 22:02:31 gambas-user-request at lists.sourceforge.net wrote:
> Message: 1
> Date: Fri, 6 Jul 2007 10:02:29 +0200
> From: Benoit Minisini <gambas at ...1...>
> Subject: Re: [Gambas-user] More Problems with SHELL (possible BUG).
> To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Message-ID: <200707061002.29711.gambas at ...1...>
> Content-Type: text/plain;  charset="iso-8859-1"
> 
> 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

That's very interesting. It seems that there is definitely more than one way to skin this cat!

Ron just showed me different method which also works. I won't post it here as I've already replied to his message, but thankyou all the same.
I'll try what you have suggested to see which way appears to work the best and I'll keep you posted!!

Thanks again!

Ben




More information about the User mailing list