shell bad substitution
2016-01-04 10:28
543 查看
#!/bin/sh
/data/script/common/run_cmd.exp 192.168.13.168 "impala-shell -islave4 -q 'insert OVERWRITE table imeis.${tableName} select ${selectFields}, ds, fnv_hash(concat(cast(ds as string), imei)) from imeis.${
tableName}_textfile;'" 100000
运行该上面脚本时,会报 bad substitution。检查发现
imeis.${
tableName}_textfile
这里出现换行,特此记录。还有看到其它网友是将{}换成了()也会报此问题。
/data/script/common/run_cmd.exp 192.168.13.168 "impala-shell -islave4 -q 'insert OVERWRITE table imeis.${tableName} select ${selectFields}, ds, fnv_hash(concat(cast(ds as string), imei)) from imeis.${
tableName}_textfile;'" 100000
运行该上面脚本时,会报 bad substitution。检查发现
imeis.${
tableName}_textfile
这里出现换行,特此记录。还有看到其它网友是将{}换成了()也会报此问题。
相关文章推荐
- Linux中用shell获取昨天、明天或多天前的日期
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- Shell 的string 操作
- linux下node-webkit自动跨平台打包shell
- 写hive sql和shell脚本时遇到几个蛋疼的问题!
- linux shell数据重定向(输入重定向与输出重定向)详细分析
- adb shell ,出错 提示error: device not found
- 希尔排序(Shell's Sort)的C语言实现
- 在shell脚本中调用另一个脚本的三种不同方法(fork, exec, source)
- shell编程基础
- 部署、收回和删除解决方式----STSADM和PowerShell
- 【Shell脚本学习25】Shell文件包含
- 【Shell脚本学习24】Shell输入输出重定向:Shell Here Document,/dev/null文件
- 【Shell脚本学习23】Shell函数参数
- 【Shell脚本学习22】Shell 函数:Shell函数返回值、删除函数、在终端调用函数
- 【Shell脚本学习21】Shell break和continue命令
- 【Shell脚本学习20】Shell until循环
- 【Shell脚本学习19】Shell while循环
- 【Shell脚本学习18】Shell for循环
- 【Shell脚本学习17】Shell case esac语句