我想在远程服务器中创建一个 hbase shell,如下所示
[root@localhost ~]#` ssh root@<hostname> " echo 'create '\'"sample'\'"','\'"cf'\'"' | hbase shell -n "`
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will
likely be removed in a future release
19/06/28 07:25:55 INFO Configuration.deprecation: hadoop.native.lib is deprecated.
Instead, use io.native.lib.available
ERROR SyntaxError: stdin:1: syntax error, unexpected null
create 'sample',\cf'
^
任何人都可以帮我解决这个问题的语法吗?
提前致谢。
最佳答案
我已经使用 EOF 选项解决了上述问题,如下所示
ssh root@<hostname> <<-EOF
echo " create 'table',schema "| hbase shell -n
文件结束
关于regex - Hbase远程shell命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56806233/