<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Is this a good time to say “Doh!”?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;Sincerely,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#1F497D">Damon Chesser</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#1F497D">SRP Linux/Red Hat Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Core Integration Engineering</span><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Apex Computer Systems Inc.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Cell 404-271-8699<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#1F497D"><a href="mailto:dchesser@acsi2000.com">dchesser@acsi2000.com</a></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> ale-bounces@ale.org [mailto:ale-bounces@ale.org]
<b>On Behalf Of </b>Jim Kinney<br>
<b>Sent:</b> Tuesday, April 26, 2011 8:18 AM<br>
<b>To:</b> Atlanta Linux Enthusiasts<br>
<b>Subject:</b> Re: [ale] bash assistance<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p>$LVM in $DF not defined<o:p></o:p></p>
<div>
<p class="MsoNormal">On Apr 26, 2011 7:38 AM, &quot;Damon Chesser&quot; &lt;<a href="mailto:dchesser@acsi2000.com">dchesser@acsi2000.com</a>&gt; wrote:<br>
&gt; Believe it or not, this is above my rudimentary bash skills and I have hit a wall: So I am seeking advice or pointers.<br>
&gt; <br>
&gt; Scenario: recording Volume Group info on a server by server bases.<br>
&gt; <br>
&gt; It did not take me long to realize that I wanted to script this. I am putting the output of my script into a spread sheet (copy and paste). The servers I am running this on are remote and I have no convenient way to get the output text to my workstation,
 so copy and paste works.<br>
&gt; <br>
&gt; Desired output:<br>
&gt; <br>
&gt; VGname VGsize LVname LVsize LVmount_point %diskused<br>
&gt; <br>
&gt; I have all the above working up to LVmount where it all goes horribly bad. Here is my code:<br>
&gt; -----start-----<br>
&gt; #!/bin/bash<br>
&gt; <br>
&gt; FILE=/tmp/dlc/vginfo_script.txt<br>
&gt; <br>
&gt; rm $FILE<br>
&gt; <br>
&gt; for VG in `vgdisplay | grep -e &quot;VG Name&quot; | awk '{print $3}'`<br>
&gt; do<br>
&gt; VGsize=`vgdisplay $VG |grep -e &quot;VG Size&quot; | awk '{print $3 $4}'`<br>
&gt; for LV in `vgdisplay -v $VG |grep &quot;LV Name&quot; | cut -d\/ -f4`<br>
&gt; do<br>
&gt; LVsize=`lvdisplay /dev/$VG/$LV | grep &quot;LV Size&quot; | awk '{print $3 &quot; &quot; $4}'`<br>
&gt; # for MNTP in `mount |grep &quot;$LVM&quot; | awk '{print $3}'`<br>
&gt; # do<br>
&gt; # DF=`df -T &quot;$MNTP&quot; |awk '{print $6}'`<br>
&gt; # done<br>
&gt; echo $VG $VGsize $LV $LVsize $MNTP $DF<br>
&gt; done<br>
&gt; done &gt; $FILE<br>
&gt; <br>
&gt; ---end----<br>
&gt; <br>
&gt; The above code, as written outputs this:<br>
&gt; <br>
&gt; vgorabak8 375.00GB lvorabak8 374.90 GB<br>
&gt; vgorabak7 375.00GB lvorabak7 374.90 GB<br>
&gt; <br>
&gt; take out the # above and it does this:<br>
&gt; <br>
&gt; vgorabak8 375.00GB lvorabak8 374.90 GB /var/lib/ntp/proc Use% -<br>
&gt; vgorabak7 375.00GB lvorabak7 374.90 GB /var/lib/ntp/proc Use% -<br>
&gt; <br>
&gt; No idea why. This makes my head hurt. I have tried everything I can think of. It seems I don't think enough!<br>
&gt; <br>
&gt; Any help would be appreciated.<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; Sincerely,<br>
&gt; <br>
&gt; Damon Chesser<br>
&gt; <a href="mailto:dchesser@acsi2000.com">dchesser@acsi2000.com</a><br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; ________________________________<br>
&gt; Disclaimer: This electronic transmission and any attachments contain confidential information belonging to the sender. This information may be legally protected. The information is intended only for the use of the individual or entity named above. If you
 are not the intended recipient or receive this message in error, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on or regarding the contents of this information is strictly prohibited. Please notify the
 sender immediately if you have received this information in error.<br>
&gt; <br>
&gt; <a href="http://www.acsi2000.com">www.acsi2000.com</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
_____________________________________________________________________________<br>
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www-935.ibm.com/services/us/index.wss/offerfamily/iss/a1026954<br>
_____________________________________________________________________________<o:p></o:p></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">Disclaimer: This electronic transmission and any attachments contain confidential information belonging to the sender. This information may be legally protected. The information is intended only for the use of the individual
 or entity named above. If you are not the intended recipient or receive this message in error, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on or regarding the contents of this information is strictly
 prohibited. Please notify the sender immediately if you have received this information in error.<br>
<br>
www.acsi2000.com<br>
</font>
</body>
</html>