>>> On 8/12/2009 at  5:49 PM, <sunny...@wcb.ab.ca> wrote: 
> I was asked to find out how many linux guests are running on our  z/VM?
> the cp commands:Q N is not very suitable for this question.

Why is "q n" not suitable?

for guest in $(vmcp q n | sed -f qnames.sed)
  do grep -q $guest excluded.names || echo $guest
  done | wc

cat qnames.sed
s/,//g
s/ - DSC$//
s/ *- DSC */ /g
/^VSM/d
s/ -L[0-9]*//g
s/ - SYSC//g


cat excluded.names
DATAMOVE
DIRMAINT
DISKACNT
DTCVSW1
DTCVSW2
EREP
FTPSERVE
GCS
OPERATOR
SMTP
SNMPD
TCPIP
and so on.

Some adjustments will have to be made based on your local environment, but that 
should be fairly easy.


Mark Post

Reply via email to