[Gambas-user] some bash commands I wish move in gambas

BB adamnt42 at gmail.com
Thu Oct 5 12:57:56 CEST 2023


On 5/10/23 7:09 pm, roberto.premoli at tiscali.it wrote:
> hello,
> in my soft i used the followed bash command
>
> cp
> tar -cvzf
> tar zxvf
> rm -rf
> ls -la
> mv -f
> md5sum
> scp
> ssh
> find
> cat
>
> I run them using Exec, they works fine.
> Now I almost complete the program and I think it will be more elegant, more "right" to use only gambas commands (if there are)
> and not external programs.

Why do you think Exec is less "elegant"? Linux and Unix is based on the 
precept "do one thing and do it well". There are equivalents in Gambas 
for a lot of these but if we just take "cp" as an example, they are yes 
"elegant" solutions for simple "cp" operations but in the long run do 
not provide the full power of the bash command. Don't misunderstand me, 
there is nothing at all wrong with the Gambas native commands, but I 
don't see why you would consider an internal to be more "elegant".

In fact, IMO Exec is a very elegant way of getting fundamental things 
provided by the bash shell to work exactly as needed in the situation.

ymmv

b

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231005/dfb2b222/attachment.htm>


More information about the User mailing list