ct-nt + bash detection

Paul Smith psmith@netezza.com
Fri Sep 14 19:06:00 GMT 2007

On Fri, 2007-09-14 at 14:11 +0200, Enrico Weigelt wrote:
> bash_version=`/bin/bash --version |head -n 1 |cut -d ' ' -f 4|sed -e "s/\..*//g;"`

You can do this all with sed more simply (imo):

        bash_version=`/bin/bash --version \
            | sed -n -e '2,$d' -e 's/^.* version \([0-9]*\).*/\1/p'`

 Paul D. Smith <psmith@netezza.com>                       http://netezza.com
 "Please remain calm--I may be mad, but I am a professional."--Mad Scientist
      These are my opinions--Netezza takes no responsibility for them.

For unsubscribe information see http://sourceware.org/lists.html#faq

More information about the crossgcc mailing list