Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALLT8.L1M01.D181214.T1630499.e-TC04_SISALP01_SISALP01_dwmsmrc9ca.xml
- ALLT8.L1M01.D181215.T1630456.e-TC04_SISALP01_SISALP01_ztzrridi9g.xml
- ALLT8.L1M01.D181216.T1631078.e-TC04_SISALP01_SISALP01_gh6xvr7u17.xml
- time= $(date +"%H%M%S%N" | cut -b 1-9)
- file="ALLT8.L1M01.D"$date".T"$time"e-TC04_SISALP01_SISALP01_"*.xml
- #!/bin/bash
- date=$(date +"%y%m%d")
- time=$(date +"%H%M%S%N" | cut -b 1-9)
- xml_file=$("ALLT8.L1M01.D"$date".T"$time"e-TC04_SISALP01_SISALP01_"*.xml)
- number_of_occurrences=$(grep -c /data/sia/seda/request/sent/"$xml_file" "<Sts>ACTC</Sts>" )
- echo $number_of_occurrences
- if [[ number_of_occurrences -eq || number_of_occurrences -gt 2 ]];
- then
- echo "Ok"
- elif [[ number_of_occurrences -lt 2 ]]; then
- echo "Error"
- 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"`
- fi
Add Comment
Please, Sign In to add comment