[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



> I'm looking for some opinions on a better way to do something that I
> currently do as part of a much larger lengthy script.  Basically I
> have a program that outputs data in the following format (sans the
> hashed lines):
> 
> -----------------------------------
> 5 colors match RGB search:
>      red
>      yellow
>      orange
>      blue
>      green
> -----------------------------------
> 
> Without using perl, and only using common progs (awk,sed,cut,etc), what 
> is the most optimized way to return a sorted, left-justified, right-trimmed,
> list of results like this:
> 
> -----------------------------------
> blue
> green
> orange
> red
> yellow
> -----------------------------------
> 
> 
> Tia,
> 
> -Jim P.

$ cat foo | grep -v RGB | awk {'print $1;'}

???

Jonathan Glass

-------------------------------------------------
This mail sent through IMP: <a  rel="nofollow" href="http://horde.org/imp/";>http://horde.org/imp/</a>


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00669" href="msg00669.html">[ale] scripting foo</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00666" href="msg00666.html">[ale] scripting foo</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00667.html">[ale] scripting foo</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00669.html">[ale] scripting foo</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00671.html">[ale] scripting foo</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00669.html">[ale] scripting foo</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00668"><strong>Date</strong></a></li>
<li><a href="threads.html#00668"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>