head -1 2016_json.txt > fcat_head.txt tail -1 2016_json.txt > fcat_tail.txt grep -e "\['" 2016_json.txt | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp.tmp mv 2016_json.txt 2016_json.txt_keep cat fcat_head.txt temp.tmp fcat_tail.txt > 2016_json.txt cp -p 2016_json.txt 2016_json.txt_20170102 grep -e "\['" 2016_json.txt | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp.tmp sed -i 's/]/],/g' temp.tmp sed -i '$ s/],/]/g' temp.tmp cat fcat_head.txt temp.tmp fcat_tail.txt > 2016_json.txt cat eisflare_json.txt 2016_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp2.tmp sed -i 's/]/],/g' temp2.tmp sed -i '$ s/],/]/g' temp2.tmp cat fcat_head.txt temp2.tmp fcat_tail.txt > zz_json.txt 20xx_json.txt files are used for the individual year searches eisflare_json.txt file is used for the "ALL Years" search NOTE: NEED to change year header in the all years search page cat eisflare_json.txt_master 2017_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp5.tmp sed -i 's/]/],/g' temp5.tmp sed -i '$ s/],/]/g' temp5.tmp cat fcat_head.txt temp5.tmp fcat_tail.txt > eisflare_json.txt_master cp -p 2014_json.txt 2014_json.txt_save grep -e '-14' 2014_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2014_json.txt cp -p 2016_json.txt 2016_json.txt_save grep -e '-16' 2016_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2016_json.txt cp -p 2017_json.txt 2017_json.txt_save grep -e '-17' 2017_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2017_json.txt cp -p 2018_json.txt 2018_json.txt_save grep -e '-18' 2018_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2018_json.txt cp -p 2019_json.txt 2019_json.txt_save grep -e '-19' 2019_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2019_json.txt cp -p 2020_json.txt 2020_json.txt_save grep -e '-20' 2020_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2020_json.txt cp -p 2021_json.txt 2021_json.txt_save grep -e '-21' 2021_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2021_json.txt cp -p 2022_json.txt 2022_json.txt_save grep -e '-22' 2022_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2022_json.txt cp -p 2023_json.txt 2023_json.txt_save grep -e '-23' 2023_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2023_json.txt ----------------------------------------------------------------------------------------------- cd /disk/solar5/solarsw/flare/eisflarecat cat 2017_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2017_json.txt cat 2018_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2018_json.txt cat 2019_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2019_json.txt cat 2020_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2020_json.txt cat 2021_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp6.tmp sed -i 's/]/],/g' temp6.tmp sed -i '$ s/],/]/g' temp6.tmp cat fcat_head.txt temp6.tmp fcat_tail.txt > 2021_json.txt ----------------------------------------------------------------------------------------------- cat 20*_json.txt | grep -e "\['" | sed 's/],/]/g' | sort | uniq | sort -k 1.20,1.21n -k 1.16,1.18M -k 1.13,1.14n -k 1.25,1.26n -k 1.28,1.29n > temp3.tmp sed -i 's/]/],/g' temp3.tmp sed -i '$ s/],/]/g' temp3.tmp cat fcat_head.txt temp3.tmp fcat_tail.txt > eisflare_json.txt ----------------------------------------------------------------------------------------------- Don't forget that the start date for the flare cataloguing software is derived from the last record in the file eisflare_json.txt_master <<< Save the old master and then: cp -p eisflare_json.txt eisflare_json.txt_master ---------------------------------------------------------------------------------------------- ssh hinode@msslxh /disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/auto_flare_catalogue_update_msslxh.sh # scp -r /disk/solar5/solarsw/flare/eisflarecat/2019 hinode@msslxh:/disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/ # scp -r /disk/solar5/solarsw/flare/eisflarecat/2019_json.txt hinode@msslxh:/disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/ # scp -r /disk/solar5/solarsw/flare/eisflarecat/2020 hinode@msslxh:/disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/ # scp -r /disk/solar5/solarsw/flare/eisflarecat/2020_json.txt hinode@msslxh:/disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/ scp -r /disk/solar5/solarsw/flare/eisflarecat/2021 hinode@msslxh:/disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/ scp -r /disk/solar5/solarsw/flare/eisflarecat/2021_json.txt hinode@msslxh:/disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/ scp -r /disk/solar5/solarsw/flare/eisflarecat/eisflare_json.txt hinode@msslxh:/disk/d1/hinode/apache-tomcat-5.5.20/webapps/SolarB/eisflare/ ----------------------------------------------------------------------------------------------- cp -p 2016_json.txt_xx 2016_json.txt grep -v -e '-16' 2017_json.txt > 2017_json.txt_xx cp -p 2017_json.txt_xx 2017_json.txt find eiswiki_pages/*.txt -newermt 20170203 > pages_mod.txt find eiswiki_pages/*.txt -not -newermt 20161207 > pages_mod.txt php do_mod_allow.php mv `find *.txt -newermt 20170108 -not -newermt 20170120` junk