regex - Hbase 远程 shell 命令
问题描述
我想在远程服务器中创建一个 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
EOF
推荐阅读
- php - 更改 pchart 分隔符
- python - 阅读outlook邮箱,连续收到两封相同主题的邮件
- scala - 当您使用 Seq(1,2,3) 创建 Seq 对象时会发生什么?
- php - 如何使用 php 压缩/降低 base64 图像的质量?
- java - 尝试使用 replaceFirst 将值添加到查询字符串参数字段
- python - 搜索 pandas.Series 中不存在的标签时出现 KeyError
- mysql - 单个 mysql 查询:使表的 NULL 值和数据库中的列
- r - For 循环不适用于 If 语句:条件的长度 > 1 并且只会使用第一个元素
- angular - 使用Angular显示外键值而不是键
- java - 获取“不支持:http://javax.xml.XMLConstants/property/accessExternalDTD 异常”,同时在 gradle 中添加 apche cxf-bundle 作为依赖项