[655] in Info-AFS_Redistribution
Re: is there a way to get a listing of pts group names?
daemon@ATHENA.MIT.EDU (Bjorn Sandell)
Tue Mar 10 17:37:54 1992
Date: Tue, 10 Mar 1992 21:58:49 +0100
From: Bjorn Sandell <Bjorn.Sandell@phc.chalmers.se>
To: info-afs@transarc.com
Cc: sasrpj@unx.sas.com
sasrpj@unx.sas.com wrote:
>I just now cobbled something together that seems a little less brute
>force than Dawn Stokes's version:
Just some minor changes of the script; now it examines the group with
the lowest id too, and throws away stderr to the bottomless bit-bucket
/dev/null.
#!/bin/ksh
pts listmax | awk '{print $NF}' | read Max
integer i=0
while (( i > $Max )) ; do
((i = i - 1))
pts exa -id $i
done > /tmp/ptsgroups 2>/dev/null
# End of Script
While we're at it, let's take a look at the members of those groups.
#!/usr/where/ever/perl
open(FILE, "/tmp/ptsgroups");
while (<FILE>)
{
if(/^Name:(.+), id.+/){
$grps .= $1;
}
}
system("pts mem -name $grps >/tmp/members 2>/dev/null");
# End of script
Bjorn
No, I'm *not* a perl hacker :)