【发布时间】:2018-04-27 14:08:34
【问题描述】:
我正在尝试在 bash 脚本中执行 cqlsh。我的脚本如下。当我尝试执行 sh 文件时,它返回 cql command not found
#!/bin/bash
set -x
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
cqlsh -e "SELECT * FROM msg.msg_log limit 1;" > /home/yunus/sh/cqlshcontrol.txt
error1=$( more /home/yunus/sh/cqlshcontrol.txt | wc -l )
if [ $error1 -lt 1 ]; then
curl -S -X POST --data "payload={\"text\": \" Cqlsh not responding, Connection Problem \",\"username\":\"Elevate Cassandra1\",\"icon_emoji\":\"${SLACK_ICON}\"}" https://hooks.slack.com/services/
fi
【问题讨论】:
-
python的位置在哪里?
-
/usr/bin/python
-
/usr/bin/python /usr/bin/python2.7 /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/include/python2.7 /usr/share/man/man1/python.1.gz
-
告诉你这是否对你有帮助:[1]:stackoverflow.com/questions/29944484/…