Yil
12-03-2010, 11:26 PM
I'm toying with an idea of how to make command line manipulation of users and perhaps groups easier. See if this makes sense or if anybody has a better idea...
Basically the idea is to have a new site command like 'site match' or 'site uglob' or something and have it accept existing user-glob patterns (! user*?[] =[.]group .FLAGS :[sec#]{><=}ratio +[.]admingroup). The command would simply return a list of matching users in a table using something like the output of the 'site users' command along with a count of matches. You could then add/subtract from this list of matching users via additional commands like 'site addmatch' or whatever.
The key here is that all OTHER site commands that accept a user-glob type argument would now allow "<>" or "<match>" or something that refers to the current list of matching users. This would allow you to issue multiple commands over and over affecting the same group of users easily...
At the moment I end up doing something like 'site users ...' see who matches, and keep refining the arguments until I get the set I want, then I issue the site change commands, etc. But it's a lot of cut/pasting and just seems silly and prone to error...
Anybody got a better idea and how useful would you think this is to you?
Basically the idea is to have a new site command like 'site match' or 'site uglob' or something and have it accept existing user-glob patterns (! user*?[] =[.]group .FLAGS :[sec#]{><=}ratio +[.]admingroup). The command would simply return a list of matching users in a table using something like the output of the 'site users' command along with a count of matches. You could then add/subtract from this list of matching users via additional commands like 'site addmatch' or whatever.
The key here is that all OTHER site commands that accept a user-glob type argument would now allow "<>" or "<match>" or something that refers to the current list of matching users. This would allow you to issue multiple commands over and over affecting the same group of users easily...
At the moment I end up doing something like 'site users ...' see who matches, and keep refining the arguments until I get the set I want, then I issue the site change commands, etc. But it's a lot of cut/pasting and just seems silly and prone to error...
Anybody got a better idea and how useful would you think this is to you?