[ 
https://issues.apache.org/jira/browse/HBASE-13229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14360482#comment-14360482
 ] 

Sean Busbey commented on HBASE-13229:
-------------------------------------

Here's our current break down amongst the .sh lot:

{code}
hbase busbey$ ls -1 bin/*.sh | wc -l
      15
hbase busbey$ head -n 1 bin/*.sh | grep "[ /]bash" | wc -l
      11
hbase busbey$ head -n 1 bin/*.sh | grep "[ /]sh" | wc -l
       2
{code}

The remaining two are {{hbase-common.sh}} and {{hbase-config.sh}}, which aren't 
meant to be directly invoked.

These got introduced in HBASE-1511, and I don't see any discussion about the 
different shell. I'd like to just update the local-*.sh files to also use bash.

Would that work for you [~gustavoanatoly]? Or do you have a specific need to 
make use of the system shell? (what shell is sh pointing at? are you on ubuntu?)

> Bug compatibility validation to start local-regionservers.sh and 
> local-master-backup.sh
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-13229
>                 URL: https://issues.apache.org/jira/browse/HBASE-13229
>             Project: HBase
>          Issue Type: Bug
>          Components: scripts
>            Reporter: Gustavo Anatoly
>            Assignee: Gustavo Anatoly
>            Priority: Minor
>              Labels: beginner
>         Attachments: HBASE-13229.patch
>
>
> 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:
> {code}
> if [[ "$i" =~ ^[0-9]+$ ]]; then
>    run_master $cmd $i
>   else
>    echo "Invalid argument"
> fi
> {code}
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to