[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: non portable sed scripts
From: |
Ralf Wildenhues |
Subject: |
Re: non portable sed scripts |
Date: |
Tue, 23 May 2006 06:44:27 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
Tim reported off-list that he ran the testsuite on his system:
> * Tim Rice wrote on Sun, May 21, 2006 at 11:37:53PM CEST:
>
> > Just for another data point I built an tested autoconf-2.59c on
> > my 7.1.4 box (where I have up to date GNU m4 and perl) and got some
> > errors. "testsuite: 65 failed, 48 passed unexpectedly"
The failure is the "keywords and ranges" test:
| /opt/src/gnu/autoconf-2.59c/tests/autotest.at:375: $EGREP -c
'none|first|second' stdout
| stderr:
| /opt/src/gnu/autoconf-2.59c/tests/autotest.at:375: $EGREP -c 'both' stdout
| stderr:
| /opt/src/gnu/autoconf-2.59c/tests/autotest.at:376: ./k -3
| 0a1,6
| > UX:tr: ERROR: Incorrect usage
| > UX:tr: TO FIX: Usage:
| > tr [-cs] string1 string2
| > tr -s[-c] string1
| > tr -d[-c] string1
| > tr -ds[-c] string1 string2
| stdout:
I have applied the following patch. An analysis of the other bug
(that prompted this thread) will follow.
Cheers,
Ralf
* lib/autotest/general.m4 (AT_INIT): UnixWare `tr' may interpret
`tr -d -' as bad option argument. Work around this by deleting
an unrelated character.
Report by Tim Rice <address@hidden>.
Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.212
diff -u -r1.212 general.m4
--- lib/autotest/general.m4 19 May 2006 02:57:46 -0000 1.212
+++ lib/autotest/general.m4 22 May 2006 03:16:03 -0000
@@ -341,14 +341,14 @@
# Ranges
[[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-])
- at_range_start=`echo $at_option |tr -d '-'`
+ at_range_start=`echo $at_option |tr -d X-`
at_range=`echo " $at_groups_all " | \
sed -e 's/^.* \('$at_range_start' \)/\1/'`
at_groups="$at_groups$at_range "
;;
[-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]])
- at_range_end=`echo $at_option |tr -d '-'`
+ at_range_end=`echo $at_option |tr -d X-`
at_range=`echo " $at_groups_all " | \
sed -e 's/\( '$at_range_end'\) .*$/\1/'`
at_groups="$at_groups$at_range "
- Re: non portable sed scripts, (continued)
- Re: non portable sed scripts, Ralf Wildenhues, 2006/05/22
- Re: non portable sed scripts, Stepan Kasal, 2006/05/22
- Re: non portable sed scripts, Ralf Wildenhues, 2006/05/22
- Re: non portable sed scripts, Stepan Kasal, 2006/05/22
- Re: non portable sed scripts, Paul Eggert, 2006/05/22
- Re: non portable sed scripts, Paul Eggert, 2006/05/23
- Re: non portable sed scripts, Tim Rice, 2006/05/23
- Re: non portable sed scripts, Stepan Kasal, 2006/05/23
- Re: non portable sed scripts, Ralf Wildenhues, 2006/05/23
- Re: non portable sed scripts, Tim Rice, 2006/05/23
Re: non portable sed scripts,
Ralf Wildenhues <=
Re: non portable sed scripts, Paul Eggert, 2006/05/23
- braced variable expansion in here documents (was: non portable sed scripts), Ralf Wildenhues, 2006/05/25
- Re: braced variable expansion in here documents, Paul Eggert, 2006/05/25
- Re: braced variable expansion in here documents, Ralf Wildenhues, 2006/05/25
- Re: braced variable expansion in here documents, Stepan Kasal, 2006/05/25
- Re: braced variable expansion in here documents, Ralf Wildenhues, 2006/05/26
- Re: braced variable expansion in here documents, Paul Eggert, 2006/05/26
Re: braced variable expansion in here documents, Ralf Wildenhues, 2006/05/25
Re: non portable sed scripts, Tim Rice, 2006/05/25
Re: non portable sed scripts, Ralf Wildenhues, 2006/05/23