I am able to successfully run
/opt/hbase/hbase_current/bin/hbase
on the command line, when connected to a GNU/Linux cluster.
However, when I put this command as a line of a bash script, the error is:
: No such file or directoryopt/hbase/hbase_current/bin/hbase
What am I doing wrong?
When I added a header to the bash script based on the results of "which bash", I get the following error:
bash: ./file.sh: /bin/bash^M: bad interpreter: No such file or directory
The contents of the file are as follows:
#!/bin/bash
ENTITY="'A.B.C'"
HBASE_SHELL="/opt/hbase/hbase_current/bin/hbase"
FILE="A.B.C.txt"
/opt/hbase/hbase_current/bin/hbase
#echo "scan $ENTITY" | $HBASE_SHELL > $FILE