Dan Nicholson wrote:
> On 1/28/07, Alexander E. Patrakov <[EMAIL PROTECTED]> wrote:
>> Tushar Teredesai wrote:
>>> cat /proc/version | head -n1 | cut -d" " -f1-3,5-7
> 
> Pet peeve. Don't use cat to create input streams when the shell is
> perfectly capable on it's own with <.

vs

> sed -n 's/.*gcc version \([^() ]*\)[() ].*/\1/p;q' < /proc/version

>From an educational view, what's wrong with showing a different way of
doing things.

Actually Tush's version above is much clearer to me than your sed,
although I don't think the head -n1 is needed (it may be in some cases,
but not for my systems).

  -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to