[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getting a list of all machines of a specific OS
- To: hobbit (at) hswn.dk
- Subject: getting a list of all machines of a specific OS
- From: Val Polyakov <vpolyakov (at) vmsinfo.com>
- Date: Mon, 2 Jun 2008 11:13:45 -0400
- User-agent: KMail/1.9.9
Is there a way to get a list of all machines in Hobbit sorted by OS?
as in, here is a full list of Linux boxes, here's a full list of Solaris
boxes, etc.
The OS details are in the info column, so I'm assuming there's a way
i'm currently doing this via this:
(in $HOBBITROOT/data/hostdata)
for i in `ls`
do
file=`ls -ltr $i | tail -1 | awk '{print $9 }'`
echo "$i `cat $i/$file | grep -i 'red hat'`"
done
this is ugly and horrible, though (although functional).
any "correct" ways of doing the same thing?