20299860: zdiff
unix utility expects BSD Bourne shell, not GNU BASH.
#1640
Milestone
zdiff
unix utility expects BSD Bourne shell, not GNU BASH.
#1640
Description
Summary:
Running the built in
zdiff
unix utility to compare the difference between two compressed files fails.Steps to Reproduce:
echo "Hello, World!" > example.txt
from Terminal.app)gzip
, keeping the original. (e.g. rungzip --keep --stdout example.txt > a.gz
from Terminal.app)echo "Goodbye, World :(" > example.txt
from Terminal.app)gzip --keep --stdout example.txt > b.gz
from Terminal.app)zdiff a.gz b.gz
Expected Results:
The terminal should print the differences between the two compressed text files.
Actual Results:
The terminal fails with a number of errors:
[howard@int-osx-prod1 ~]% zdiff ~/production.sql.gz ~/development.sql.gz
/usr/bin/zdiff: line 49: setvar: command not found
/usr/bin/zdiff: line 50: setvar: command not found
/usr/bin/zdiff: line 49: setvar: command not found
/usr/bin/zdiff: line 50: setvar: command not found
Version:
Mac OS X Yosemite 10.10.2 (14C1514)
Darwin int-osx-prod1 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Notes:
Running the same test on a FreeBSD server returns the expected results.
[howard@ext-bsd-a13 ~]> uname -a
FreeBSD ext-bsd-a13.hplogsdon.net 9.3-STABLE FreeBSD 9.3-STABLE #1 r277307: Sat Jan 17 19:11:50 MST 2015 root@int-fbsd-build.hplogsdon.net:/usr/obj/usr/src/sys/HPLOGSDON_NET i386
[howard@ext-bsd-a13 ~]> echo "Hello, World!" > example.txt
[howard@ext-bsd-a13 ~]> gzip -k -c example.txt > a.gz
[howard@ext-bsd-a13 ~]> echo "Goodbye, World :(" > example.txt
[howard@ext-bsd-a13 ~]> gzip -k -c example.txt > b.gz
[howard@ext-bsd-a13 ~]> zdiff ~/a.gz ~/b.gz
1c1
< Hello, World!
the shell /bin/sh on OS X, is a link to /bin/bash, the GNU Bourne Again Shell (GNU Bash-3.2). On FreeBSD /bin/sh's manpage states that it's version is the rewritten version modeled after Bourne shell from AT&T System V Release 4 UNIX. FreeBSD's
sh
manpage reference a "setvar" command, where as GNU's BASH does not.Configuration:
Attachments:
Product Version: 10.10.2 (14C1514)
Created: 2015-03-25T22:21:31.920541
Originated: 2015-03-25T00:00:00
Open Radar Link: http://www.openradar.me/20299860
The text was updated successfully, but these errors were encountered: