[
https://issues.apache.org/jira/browse/HBASE-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14046547#comment-14046547
]
Demai Ni commented on HBASE-11431:
----------------------------------
currently. I usually did this to ge the same functionality.
1) put the hbase shell commands in to a txt file. For example, I put this line
put 't1_dn15','row5','cf1:q1','row5_from15'
into file cmd.txt
2) then run this
$hbase shell < cmd.txt
It will work well like this
{code}
$ hbase shell < cmd.txt
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.99.0-SNAPSHOT, redfe6592dfcab57f6f2a78f73d4fc788e62707e9, Fri Jun 27
15:36:44 PDT 2014
put 't1_dn15','row5','cf1:q1','row5_from15'
0 row(s) in 0.4750 seconds
{code}
And user can certainly put more than one command in the text file. So will that
serve the requirement of this jira?
> Add support of running from command line for 'hbase shell'
> ----------------------------------------------------------
>
> Key: HBASE-11431
> URL: https://issues.apache.org/jira/browse/HBASE-11431
> Project: HBase
> Issue Type: New Feature
> Components: Admin
> Affects Versions: 0.89-fb
> Reporter: Yi Deng
> Priority: Minor
> Labels: shell
> Fix For: 0.89-fb
>
>
> Add support of running from command line for 'hbase shell'.
> Now you can execute shell command from the bash like this:
> bin/hbase shell --exec='scan ".META"'
> The result can be piped to grep or other command.
--
This message was sent by Atlassian JIRA
(v6.2#6252)