(1)编写脚本如下,HDFS路径自己传入
(2)执行脚本如下
(3)注意
脚本中空格非常重要:
比如说:
if [$REDIS_SENTINEL_ENABLE -eq 1]; then
应该写成
if [ $REDIS_SENTINEL_ENABLE -eq 1 ]; then
(方括号前后有空格,then之前有空格)的
在if判断中[]这个符号有特殊要求。里面与代码之间要有空格隔开的。
脚本中空格非常重要:
比如说:
if [$REDIS_SENTINEL_ENABLE -eq 1]; then
应该写成
if [ $REDIS_SENTINEL_ENABLE -eq 1 ]; then
(方括号前后有空格,then之前有空格)的
在if判断中[]这个符号有特殊要求。里面与代码之间要有空格隔开的。
Linux脚本文件的生成
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M