In portable shell scripts (using #!/bin/sh) we have to use single square

brackets, [ ], instead of the bash-ism double square brackets, [[ ]].
This commit is contained in:
David Young 2019-12-19 15:06:57 -06:00
parent d11b347aa7
commit ec4418a757
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
# supports SWMR.
./swmr_check_compat_vfd
rc=$?
if [[ $rc != 0 ]] ; then
if [ $rc != 0 ] ; then
echo
echo "The VFD specified by the HDF5_DRIVER environment variable"
echo "does not support SWMR."

View File

@ -923,7 +923,7 @@ GREPTEST()
cd $TESTDIR
$ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
if [[ "$txttype" = "ERRTXT" ]]; then
if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null