Details
Description
Running the following line, using /bin/sh:
$ bin/local-regionservers.sh --config ~/hbase-dev/hbase-conf/conf/ start 1 2 3 4 5
Produces the output below:
bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
Invalid argument
bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
Invalid argument
bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
Invalid argument
bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
Invalid argument
bin/local-regionservers.sh: 55: bin/local-regionservers.sh: [[: not found
Invalid argument
Considering:
if [[ "$i" =~ ^[0-9]+$ ]]; then run_master $cmd $i else echo "Invalid argument" fi
The reasons is that the regex operator =~ doesn't have compatibility with /bin/sh but works running /bin/bash
$ bash -x bin/local-regionservers.sh --config ~/hbase-dev/hbase-conf/conf/ start 1 2 3 4 5