将输出管道传输到 shell 脚本 |亚马逊 Linux
piping the output into a shell script | Amazon Linux
我有一个案例,我需要在 OS Amazon Linux 中使用命令启动 shell 脚本。
下面是我通过的命令
[premkumar@rails-app-5 ~]$ sudo rds-watch-db-logfile fdstaging --log-file-name slowquery/mysql-slowquery.log | ./watch.sh
以下是回复..
-bash: ./watch.sh: Permission denied
Watch.sh
#! /bin/bash
URL="https://collectors.sumologic.com/receiver/v1/http/<unique URL string>"
while read data;
do
curl --data "$data" $URL
done
-- 结束
引用link是https://www.sumologic.com/2014/07/28/pushing-aws-rds-logs-to-sumo-logic/
谁能帮帮我?我需要 运行 这个 shell 脚本和命令。请帮助。
您可能还没有在脚本中设置可执行位。尝试 chmod a+x watch.sh
再试一次。
我有一个案例,我需要在 OS Amazon Linux 中使用命令启动 shell 脚本。 下面是我通过的命令
[premkumar@rails-app-5 ~]$ sudo rds-watch-db-logfile fdstaging --log-file-name slowquery/mysql-slowquery.log | ./watch.sh
以下是回复..
-bash: ./watch.sh: Permission denied
Watch.sh
#! /bin/bash
URL="https://collectors.sumologic.com/receiver/v1/http/<unique URL string>"
while read data;
do
curl --data "$data" $URL
done
-- 结束
引用link是https://www.sumologic.com/2014/07/28/pushing-aws-rds-logs-to-sumo-logic/
谁能帮帮我?我需要 运行 这个 shell 脚本和命令。请帮助。
您可能还没有在脚本中设置可执行位。尝试 chmod a+x watch.sh
再试一次。