Guest User

Untitled

a guest
Dec 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. ALLT8.L1M01.D181214.T1630499.e-TC04_SISALP01_SISALP01_dwmsmrc9ca.xml
  2.  
  3. ALLT8.L1M01.D181215.T1630456.e-TC04_SISALP01_SISALP01_ztzrridi9g.xml
  4.  
  5. ALLT8.L1M01.D181216.T1631078.e-TC04_SISALP01_SISALP01_gh6xvr7u17.xml
  6.  
  7. time= $(date +"%H%M%S%N" | cut -b 1-9)
  8.  
  9. file="ALLT8.L1M01.D"$date".T"$time"e-TC04_SISALP01_SISALP01_"*.xml
  10.  
  11. #!/bin/bash
  12.  
  13. date=$(date +"%y%m%d")
  14.  
  15. time=$(date +"%H%M%S%N" | cut -b 1-9)
  16.  
  17. xml_file=$("ALLT8.L1M01.D"$date".T"$time"e-TC04_SISALP01_SISALP01_"*.xml)
  18.  
  19. number_of_occurrences=$(grep -c /data/sia/seda/request/sent/"$xml_file" "<Sts>ACTC</Sts>" )
  20.  
  21. echo $number_of_occurrences
  22.  
  23. if [[ number_of_occurrences -eq || number_of_occurrences -gt 2 ]];
  24.  
  25. then
  26. echo "Ok"
  27.  
  28. elif [[ number_of_occurrences -lt 2 ]]; then
  29.  
  30. echo "Error"
  31. send_mail=`echo "Are present $number_of_occurrences with date $date in the path /data/sia/seda/response/processed" | mailx -s "[SISAL] check_morning_2" -r "myworkgroup@mydomain.com"`
  32.  
  33. fi
Add Comment
Please, Sign In to add comment