<div dir="ltr">You might want to consider using the contents of /proc/mounts instead of the output of df as your source of mounted file systems. /proc/mounts is easier to parse and it&#39;s the canonical source for mount information. Sometimes df will lie to you. Google  &quot;df does not show all mounts&quot; for relevant circumstances.<div>

<br></div><div>For example, your awk and grep could be replaced with just &quot;grep ^/dev /proc/mounts&quot; and require no more trimming or manipulation.<div><br></div><div>QH</div></div></div><div class="gmail_extra">
<br>
<br><div class="gmail_quote">On Wed, Jun 4, 2014 at 5:17 PM,  <span dir="ltr">&lt;<a href="mailto:foo7775@comcast.net" target="_blank">foo7775@comcast.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="font-family:Arial;font-size:12pt;color:#000000"><div>Much appreciated Vishal, that makes complete sense.  I spent enough time testing it with different combinations of backticks, etc. that I&#39;m not at all surprised that something like that slipped through.  I&#39;ll tweak it a bit <em>(either later tonight, or early tomorrow)</em> &amp; try it again.<br>

</div><div><br></div><div>Thanks again.<br></div><div><br></div><div>T.<br></div><div><br></div><hr><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt">

<div class=""><b>From: </b>&quot;Vishal Verma&quot; &lt;<a href="mailto:stellarhopper@gmail.com" target="_blank">stellarhopper@gmail.com</a>&gt;<br><b>To: </b>&quot;list, CLUE&quot; &lt;<a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a>&gt;<br>

</div><b>Sent: </b>Wednesday, June 4, 2014 5:04:22 PM<div class=""><br><b>Subject: </b>Re: [clue] Bash baffler<br><div><br></div></div><div><div class="h5">But the real problem is you&#39;re using both $() and ``<br>It is trying to execute the text output of `df -hl  | awk &#39;{print<br>

$NF}&#39; | grep -v ^\/dev` and feeding it into another subshell as a<br>command, which of course it isn&#39;t.<br><div><br></div>-Vishal<br><div><br></div>On Wed, Jun 4, 2014 at 4:59 PM, Vishal Verma &lt;<a href="mailto:stellarhopper@gmail.com" target="_blank">stellarhopper@gmail.com</a>&gt; wrote:<br>

&gt; On Wed, Jun 4, 2014 at 4:53 PM,  &lt;<a href="mailto:foo7775@comcast.net" target="_blank">foo7775@comcast.net</a>&gt; wrote:<br>&gt;&gt; df -hl  | awk &#39;{print $NF}&#39; | grep -v ^\/dev<br>&gt;<br>&gt; The &#39;on&#39; seems to be coming from the last column of the &#39;header&#39; of<br>

&gt; the df command:<br>&gt; Filesystem      Size  Used Avail Use% Mounted on<br>&gt;<br>&gt; You want something like:<br>&gt; df -hl  | grep -v &quot;^Filesystem&quot; | awk &#39;{print $NF}&#39; | grep -v ^\/dev<br>&gt;<br>

&gt; -Vishal<br>_______________________________________________<br>clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>For information, account preferences, or to unsubscribe see:<br>

<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></div></div></div><div><br></div></div></div><br>_______________________________________________<br>


clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>