Reputation: 127
I have a case like in which i need to initiate a shell script with a command in the OS Amazon Linux.. The below is the command which i pass through
[premkumar@rails-app-5 ~]$ sudo rds-watch-db-logfile fdstaging --log-file-name slowquery/mysql-slowquery.log | ./watch.sh
The below is the response..
-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
-- end
The reference link is https://www.sumologic.com/2014/07/28/pushing-aws-rds-logs-to-sumo-logic/
Can anyone pls help me? I need to run this shell script with the command. Pls help.
Upvotes: 0
Views: 93
Reputation: 24052
You probably haven't set the executable bit on your script. Try chmod a+x watch.sh
and try again.
Upvotes: 1