Hello,
To write scripts with HBase shell it includes non-interactive mode, this mode allows you to use HBase Shell in scripts, and allow the script to access the exit status of the HBase Shell commands. To invoke non-interactive mode, use the switch:
-n or --non-interactive
This small example script shows how to use HBase Shell in a Bash script.
!/bin/bash
echo 'list' | hbase shell -n
status=$?
if [$status -ne 0]; then
echo "The command may have failed."