bug-bash
[Top][All Lists]
Advanced

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

Re: Yet Another test option


From: Chet Ramey
Subject: Re: Yet Another test option
Date: Sun, 03 Jul 2011 14:21:21 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10

On 7/2/11 3:49 PM, Bruce Korb wrote:
> Hi Chet, et al.,
> 
> Given that sort(1GNU) now has a sort-by-version-ordering (sort -V),
> it would seem reasonable to do version comparisons without having
> to do a series of fork & execs.  In other words, abbreviate this:
> 
>     min_os_ver=`
>       printf '2.6.27\n%s\n' "$LINUXRELEASE" | sort -V | head -1`
>     if test "X$min_os_ver" = "X2.6.27" ; then
> 
> into something like this:
> 
>     if test "2.6.27" -Vle "$LINUXRELEASE" ; then
> 
> or add a different operator to [[ ]] contexts?

This seems like it is of really limited usefulness to be baked into
the shell.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]