[Gambas-user] Re : Re: SHELL command problem
Ron Onstenk
ronstk at ...239...
Fri Feb 8 18:22:03 CET 2008
On Friday 08 February 2008 10:14, Stefano Palmeri wrote:
>> >>Try to put a WAIT at the end of the SHELL sentence.
>> >>
>> >>SHELL "aureport -f -i --summary --failed | /root/Desktop/try" WAIT
>> >>
>> >>Stefano
> > I have already tried the same command adding WAIT but in vain. Actually,
> > the first part of the command sends some data to the 2nd part of the
> > command through the " | " operator, which is not happening via the SHELL
> > command, but happens fine when executed on the terminal. Any suggestions ??
> > Thanks,
> > Mukul Khullar.
>
> Try this:
>
> SHELL "aureport -f -i --summary --failed 2>&1 | /root/Desktop/try" WAIT
>
> Stefano
>
Or this one:
>> >>SHELL "aureport -f -i --summary --failed 2>&1 | /root/Desktop/try" WAIT
to:
SHELL "(aureport -f -i --summary --failed | /root/Desktop/try)" WAIT
Take not of the '(' and ')'
without the () you have to read SHELL "command1 | command2" where at the '|' there
is a jump back from each command to the initiating shell and here is gambas the caller.
The env (where the temp pipe exists) is lost and given again to command2.
By using the () all is executed in one subshell with same environment for both commands
and keeping the temp pipe. (When I'm right, it is however not exact how it works)
Adding the () did solve in the past for someone else the environment problems with gambas.
Ron
More information about the User
mailing list