Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Ok to change test-fuzzed-cap.sh from #!/bin/bash to /bin/sh?

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Tue, 13 Sep 2011 12:55:21 -0400
Stephen Fisher wrote:
Are there any objections to changing the top line of the tools/test-fuzzed-cap.sh script from #!/bin/bash to #!/bin/sh? I don't normally have bash installed, and /bin/sh is more universal and works fine in this simple script.

Traditionally 'sh' (at least the original one) does not like things like:

    export WIRESHARK_RUN_FROM_BUILD_DIRECTORY=

So instead you have to do:

WIRESHARK_RUN_FROM_BUILD_DIRECTORY=
export WIRESHARK_RUN_FROM_BUILD_DIRECTORY

At least I've had that problem on SVR4-derived systems (Solaris). IIRC you usually use FreeBSD so you might have the Almquist Shell[1] which might behave differently.

[1] http://en.wikipedia.org/wiki/Almquist_Shell


Anyway, sure enough, using 'sh' on Solaris doesn't work:

/Wireshark/source/tools/test-fuzzed-cap.sh: usage: ulimit [ -HSacdfnstv ] [ limit ]
/Wireshark/source/tools/test-fuzzed-cap.sh: WIRESHARK_RUN_FROM_BUILD_DIRECTORY=: is not an identifier