[Gambas-user] EXEC vs. SHELL

Doriano Blengino doriano.blengino at ...1909...
Wed Jun 17 10:38:17 CEST 2009


Rolf-Werner Eilert ha scritto:
> Doriano Blengino schrieb:
>   
>> Rolf-Werner Eilert ha scritto:
>>     
>>> Could someone explain me why there are two different ways of executing 
>>> shell commands and how they differ in practice? I mean, when do I want 
>>> EXEC and when will I want SHELL? What's the idea behind them?
>>>
>>> Thanks for all hints :-)
>>>   
>>>       
>> SHELL invokes /bin/sh and passes it a single command line. /bin/sh 
>> parses this command line exactly the same way you do on a normal shell. So,
>>
>>     SHELL "ls -l *.o >/tmp/list"
>>
>> .......
>>
>>     
>
>
> Oh yeah, thank you very much for that comprehensive explanation!
>
> In fact, I find your answer so well written that I want to propose to 
> take it up into the Gambas wiki, linked between SHELL and EXEC or just 
> as part of both texts. What do you think?
>   
Thanks for your appreciation, it makes me feel good.

I think that my writing could be better - it was only a quick reply in a 
forum -, but the more important thing you said is about cross-linking 
together several pages of the docs: sections like "SEE ALSO" and 
"DIFFERENCES BETWEEN... (similar ways to do something)".

The same problem is found in the normal man(1) pages - related arguments 
are in fact not related in the documentation. For example, Samba and NFS 
do (more or less) the same thing, but the documentation treats them as 
completely separated. I understand this, but this is no good anyway.

Regards,
Doriano





More information about the User mailing list