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

T Lee Davidson t.lee.davidson at gmail.com
Thu Oct 5 12:26:29 CEST 2023


On 10/5/23 04:39, 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.

There are Gambas file and directory functions that can be substituted for cp, rm, ls, mv [https://gambaswiki.org/wiki/cat/file]. 
You might be able to create your own 'find' function using RDir and others. For 'cat', you read and write using streams.

For md5sum, there is the gb.hash component. There is also gb.compress though I don't think it handles tar files.

I don't know of any Gambas equivalent for scp or ssh.


-- 
Lee



More information about the User mailing list