Dear Osamu
Could you run bash -x for debugging?
Thanks
Sorry for the inconvenience.
Julian
Osamu Tatebe via IO-500 <io-500(a)vi4io.org> schrieb am Sa., 20. Okt. 2018,
08:25:
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(a)dilger.ca> wrote:
> On Oct 19, 2018, at 10:12 AM, Osamu Tatebe via IO-500 <io-500(a)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(a)cs.tsukuba.ac.jp>
_______________________________________________
IO-500 mailing list
IO-500(a)vi4io.org
https://www.vi4io.org/mailman/listinfo/io-500