Thanks Osamu for reporting and thanks Andreas for writing the fix.  I've tested that and have now pushed it to master.

On Sun, Oct 21, 2018 at 7:03 PM Andreas Dilger via IO-500 <io-500@vi4io.org> wrote:
This can be fixed by changing the lines in io500_fixed.sh:

    [ -z "${!V}" -o "${!V}" = "xxx" ] &&
      echo "Need to set '$V' in io500.sh" && exit 1

to

    if [ -z "$(eval echo \$$V)" ] || [ "${!V}" = "xxx" ]; then
      echo "Need to set '$V' in io500.sh"
      exit 1
    fi

so that it will produce a useful error message from the shell.  Unfortunately, I'm having trouble pushing a patch to Github right now.

Cheers, Andreas

> On Oct 20, 2018, at 15:25, Osamu Tatebe <tatebe@cs.tsukuba.ac.jp> wrote:
>
> Hi Andres,
>
> Thanks for the information.  The reason why I cannot
> execute is one of variables is not set.
>
> In this case, io500_fixed.sh stops with !V: unbound
> variable, instead of echo "Need to set '$V' in io500.sh"
> && exit 1 due to set -u
>
> Thanks,
> Osamu
>
> On Sat, 20 Oct 2018 00:33:57 -0600
> Andreas Dilger <adilger@dilger.ca> wrote:
>
>>> On Oct 19, 2018, at 10:12 AM, Osamu Tatebe via IO-500 <io-500@vi4io.org> wrote:
>>>
>>> Hi,
>>>
>>> io500_fixed.sh seems to have a bug.
>>>
>>> ./bin/io500_fixed.sh: line 48: !V: unbound variable
>>>
>>> Here are lines in io500_fixed.sh
>>>
>>> 47:  for V in $important_vars; do
>>> 48:    [ -z "${!V}" -o "${!V}" = "xxx" ] &&
>>> 49:      echo "Need to set '$V' in io500.sh" && exit 1
>>> 50:  done
>>>
>>> Why ${!V} instead of ${V}?
>>
>> The "${!V}" syntax means "print the variable whose name
>> is stored in "$V".  In this case, $important_vars holds
>> a list of variable names that need to be set for io500
>> to run properly, and this code is an efficient way to
>> check that all of them are set.
>>
>> Are you running on a system that does not use bash, or
>> a very old version of bash that doesn't handle ${!VAR}?
>>
>> Cheers, Andreas
>
> --
> Osamu Tatebe <tatebe@cs.tsukuba.ac.jp>
_______________________________________________
IO-500 mailing list
IO-500@vi4io.org
https://www.vi4io.org/mailman/listinfo/io-500