unable to run the script [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash 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






share|improve this 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














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






share|improve this 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












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






share|improve this question














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








share|improve this question













share|improve this question




share|improve this question








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












  • 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










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.






share|improve this answer



























    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.






    share|improve this answer
























      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.






      share|improve this answer






















        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.






        share|improve this answer












        There is a comma at the end of the pipes at the echo. Renove that and it should be fine.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 30 '17 at 4:46









        Joe Theman

        4016




        4016












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay