unable to run the script [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
-2
down vote
favorite
d1=$(date --date="-10 min" "+%Y-%m-%d %H:%M")
d2=$(date --date="-1 min" "+%Y-%m-%d %H:%M")
sed -n "/$d1/,/$d2/p" /tmp/samba.log
while read -r line; do
if [[ $line -eq '- Exception from external service:' ]] ;
then
echo "Subject: Samba is Down "| /usr/sbin/sendmail -f rai@for.com
-t xyz@cyient.com,
fi
done
linux
closed as unclear what you're asking by jasonwryan, Stephen Rauch, thrig, G-Man, Sparhawk Oct 30 '17 at 5:45
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
-2
down vote
favorite
d1=$(date --date="-10 min" "+%Y-%m-%d %H:%M")
d2=$(date --date="-1 min" "+%Y-%m-%d %H:%M")
sed -n "/$d1/,/$d2/p" /tmp/samba.log
while read -r line; do
if [[ $line -eq '- Exception from external service:' ]] ;
then
echo "Subject: Samba is Down "| /usr/sbin/sendmail -f rai@for.com
-t xyz@cyient.com,
fi
done
linux
closed as unclear what you're asking by jasonwryan, Stephen Rauch, thrig, G-Man, Sparhawk Oct 30 '17 at 5:45
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
At Least add the error that you get while trying to run the script.
â Hunter.S.Thompson
Oct 30 '17 at 4:54
Suspiciously similar to Unable to get output â this is almost certainly homework.âÂÂWe donâÂÂt do peopleâÂÂs homework.
â G-Man
Oct 30 '17 at 4:57
add a comment |Â
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
d1=$(date --date="-10 min" "+%Y-%m-%d %H:%M")
d2=$(date --date="-1 min" "+%Y-%m-%d %H:%M")
sed -n "/$d1/,/$d2/p" /tmp/samba.log
while read -r line; do
if [[ $line -eq '- Exception from external service:' ]] ;
then
echo "Subject: Samba is Down "| /usr/sbin/sendmail -f rai@for.com
-t xyz@cyient.com,
fi
done
linux
d1=$(date --date="-10 min" "+%Y-%m-%d %H:%M")
d2=$(date --date="-1 min" "+%Y-%m-%d %H:%M")
sed -n "/$d1/,/$d2/p" /tmp/samba.log
while read -r line; do
if [[ $line -eq '- Exception from external service:' ]] ;
then
echo "Subject: Samba is Down "| /usr/sbin/sendmail -f rai@for.com
-t xyz@cyient.com,
fi
done
linux
edited Oct 30 '17 at 2:49
Ipor Sircer
8,9121920
8,9121920
asked Oct 30 '17 at 2:32
praveen
1
1
closed as unclear what you're asking by jasonwryan, Stephen Rauch, thrig, G-Man, Sparhawk Oct 30 '17 at 5:45
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by jasonwryan, Stephen Rauch, thrig, G-Man, Sparhawk Oct 30 '17 at 5:45
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
At Least add the error that you get while trying to run the script.
â Hunter.S.Thompson
Oct 30 '17 at 4:54
Suspiciously similar to Unable to get output â this is almost certainly homework.âÂÂWe donâÂÂt do peopleâÂÂs homework.
â G-Man
Oct 30 '17 at 4:57
add a comment |Â
1
At Least add the error that you get while trying to run the script.
â Hunter.S.Thompson
Oct 30 '17 at 4:54
Suspiciously similar to Unable to get output â this is almost certainly homework.âÂÂWe donâÂÂt do peopleâÂÂs homework.
â G-Man
Oct 30 '17 at 4:57
1
1
At Least add the error that you get while trying to run the script.
â Hunter.S.Thompson
Oct 30 '17 at 4:54
At Least add the error that you get while trying to run the script.
â Hunter.S.Thompson
Oct 30 '17 at 4:54
Suspiciously similar to Unable to get output â this is almost certainly homework.âÂÂWe donâÂÂt do peopleâÂÂs homework.
â G-Man
Oct 30 '17 at 4:57
Suspiciously similar to Unable to get output â this is almost certainly homework.âÂÂWe donâÂÂt do peopleâÂÂs homework.
â G-Man
Oct 30 '17 at 4:57
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
There is a comma at the end of the pipes at the echo. Renove that and it should be fine.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
There is a comma at the end of the pipes at the echo. Renove that and it should be fine.
add a comment |Â
up vote
1
down vote
There is a comma at the end of the pipes at the echo. Renove that and it should be fine.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
There is a comma at the end of the pipes at the echo. Renove that and it should be fine.
There is a comma at the end of the pipes at the echo. Renove that and it should be fine.
answered Oct 30 '17 at 4:46
Joe Theman
4016
4016
add a comment |Â
add a comment |Â
1
At Least add the error that you get while trying to run the script.
â Hunter.S.Thompson
Oct 30 '17 at 4:54
Suspiciously similar to Unable to get output â this is almost certainly homework.âÂÂWe donâÂÂt do peopleâÂÂs homework.
â G-Man
Oct 30 '17 at 4:57