From MAILER-DAEMON Thu Dec 23 10:31:44 1999
Date: Thu, 23 Dec 1999 10:31:44 -0500 (EST)
From: Mail System Internal Data <MAILER-DAEMON@chele.cais.net>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
X-IMAP: 0945963104 0000000000
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message.  It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

From leed@chele.cais.net Wed Dec 22 11:12:00 1999 -0500
Status: R
X-Status: 
X-Keywords:
Received: from mailman.enron.com (mailman.enron.com [192.152.140.66])
	by chele.cais.net (8.9.1/8.9.1) with ESMTP id LAA12431
	for <leed@chele.cais.net>; Wed, 22 Dec 1999 11:12:04 -0500 (EST)
Received: from ene-mta01.enron.com (ene-mta01.enron.com [192.168.63.131])
	by mailman.enron.com (8.8.8/8.8.8/corp-1.03) with SMTP id QAA16120
	for <leed@chele.cais.net>; Wed, 22 Dec 1999 16:12:05 GMT
Received: by ene-mta01.enron.com(Lotus SMTP MTA v4.6.3  (733.2 10-16-1998))  id 8625684F.00599BBF ; Wed, 22 Dec 1999 10:18:45 -0600
X-Lotus-FromDomain: EES@ENRON
From: "Timothy Lindgren" <Timothy_Lindgren@enron.com>
To: L <leed@chele.cais.net>
Message-ID: <8625684F.00599A3A.00@ene-mta01.enron.com>
Date: Wed, 22 Dec 1999 10:12:05 -0600
Subject: Re: [Q] how to map SAR output to cXtXdxsX?
Mime-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain; charset=us-ascii
Content-Length: 880




I like the following to translate MD/SD's to physical names.

Hope it helps,
Tim


#!/bin/ksh
# Translate the instant name to physical device name
echo
echo "Physical Device         Instant"
echo "===============         ======="
for i in /dev/dsk/c*t*d*s2
do
     dev=`ls -l $i | nawk '{
               n=split($NF, a, "/");
               split(a[n], b, ":");
            for (i =4; i<n; i++)
                              printf("/%s",a[i]);
          printf ("/%s\n", b[1]);
                         }'
          `

     if [[ "$dev" = "" ]]
     then
               exit
     fi

          #echo $dev
          echo "$i <---> \c"

     nawk -v dev=$dev '
               $1 ~ dev {
                         n=split(dev,a,"/");
                         split(a[n],b,"@");
                         printf ("%s%s\n",b[1], $2);
          }
          ' /etc/path_to_inst
done



