lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.3.51 oddity in expr (scripts/Menuconfig)
GNU expr and BSD expr seem to have fairly different ways of handling
patterns for the `:' operator -- the GNU style of using '\|' to split
patterns doesn't seem to work on BSD exprs, and the BSD style of using
'|' doesn't work on GNU (tested on an Irix box, Mastodon, SLS, and a
Solaris box.) I believe this patch actually will work on both flavors
of expr, and help preserve the cosmic balance of the world.

____
david parsons \bi/ Dilute! Dilute!
\/

--- ./scripts/Menuconfig.orig Sun Feb 20 20:13:10 2000
+++ ./scripts/Menuconfig Sat Mar 11 08:49:14 2000
@@ -545,7 +545,7 @@

# Semantics of + and ? in GNU expr changed, so
# we avoid them:
- if expr "$answer" : '0$\|-[1-9][0-9]*$\|[1-9][0-9]*$' >/dev/null
+ if expr "$answer" : '0$' '|' "$answer" : '[1-9][0-9]*$' '|' "$answer" : '-[1-9][0-9]*$' >/dev/null
then
eval $2="$answer"
else
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.034 / U:1.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site