Re: Func Globbing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



esimmonds wrote:
Hi,

First of all, let me compliment the dev team.  Func is a great program.

Now to business: I have been evaluating Func for use at my employer (Fermi Lab). We currently use an internally written program called Rgang to do remote command execution. Rgang lets us submit remote commands as follows:

$ rgang --rsh=ssh --skip 'root@srv49{1,2,9}' 'root@srv49{0-9},root@srv484' 'uptime'

root@srv490= 09:22:42 up 245 days, 14:53, 0 users, load average: 2.00, 2.00, 2.00 root@srv493= 09:22:41 up 348 days, 19:49, 0 users, load average: 1.10, 1.63, 1.85 root@srv494= 09:22:42 up 348 days, 19:49, 0 users, load average: 2.00, 2.01, 2.00 root@srv495= 09:22:42 up 404 days, 17:18, 0 users, load average: 2.02, 2.02, 2.00 root@srv496= 09:22:42 up 348 days, 19:47, 0 users, load average: 2.00, 2.02, 2.00 root@srv497= 09:22:42 up 264 days, 21:47, 0 users, load average: 0.00, 0.00, 0.00 root@srv498= 09:22:42 up 4 days, 18:41, 0 users, load average: 2.07, 2.05, 2.01 root@srv484= 09:22:42 up 348 days, 19:52, 0 users, load average: 2.08, 2.02, 2.00

Note two features:

1. The "--skip" feature lets us skip one or more machines using globbing within the larger range

Sounds like a nice feature to add as an option.

2. The globbing supports {} Shell expansion, not just * wildcarding.




I have not been able to duplicate this globbing within Func. We can see all kinds of potential uses for Func here to replace or complement Rgang, but I'd sure like to see both of these globbing features available in Func. The group feature (/etc/func/groups) is probably not a good workaround because we are often running this on hundreds or thousands of machines at a time on an adhoc basis.

Func uses fnmatch.

* matches everything
       ?       matches any single character
       [seq]   matches any character in seq
       [!seq]  matches any char not in seq


Is there a way with the current Func to achieve similar functionality in Func, or is this something the dev team would consider implementing? By the way, anyone interested in rgang can look here: http://fermitools.fnal.gov/abstracts/rgang/abstract.html

How about trying to add a patch to implement (A)? Does fnmatch meet your needs as above?


Thanks very much,


Edward Simmonds



------------------------------------------------------------------------

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux