[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gzip-1.3.10 test failures
From: |
Nelson H. F. Beebe |
Subject: |
Re: gzip-1.3.10 test failures |
Date: |
Mon, 8 Jan 2007 18:53:25 -0700 (MST) |
Thanks for the patches to gzip-1.3.10; I applied them and made a new
local distribution called gzip-1.3.10.p1, and then redid several
builds on each of the three systems for which I reported failure.
All builds now pass on Solaris 7 SPARC and DEC Alpha OSF/1 4.0.
The SGI IRIX MIPS builds still fail, with this complaint:
./zgrep -iV >/dev/null
./zgrep[68]: syntax error at line 4 : `)' unexpected
This appears to be a limitation of the Bourne shell on this system.
The latest bash, ksh, pdksh, and zsh releases all report output like
this:
% pdksh zgrep -iV
zgrep (gzip) 1.3.10
....
With /bin/sh, I get the above-noted failure, and turning on the
verbose flag produces this snippet:
% sh -vx zgrep -iV
...
+ test 1 -ne 0
+ option=-iV
+ shift
+ optarg=
+ arg2=-'$(expr X-iVX : X-.[0-9]*\(.*\) | sed
s/'/'\\''/g
$s/X$/'/
)
+ eval set -- -'$(expr X-iVX : X-.[0-9]*\(.*\) | sed
s/'/'\\''/g
$s/X$/'/
) ${1+"$@"}
zgrep[68]: syntax error at line 4 : `)' unexpected
The problem is that the newer $(...) syntax introduced by POSIX is not
understood by older shells. Here is a short example:
% cat foo.sh
#!/bin/sh
n=$(expr 1 + 2 + 3)
echo $n
% sh foo.sh
$(expr 1 + 2 + 3)
% bash foo.sh
6
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: address@hidden -
- 155 S 1400 E RM 233 address@hidden address@hidden -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------