,file_compare.sh 515 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # Coding: utf-8
  3. # Editor: kate
  4. # Created 2022-12-02
  5. #_sudo_apt_install_
  6. #_sudo_dpkg_i_
  7. source $HOME/.SCR/lib.sh
  8. fun_log_dir_create $0 365
  9. read hash_from_file < "$dir_script/DATA1_as.m3u"
  10. new_hash="$(sha1sum $HOME/DATA1/backup/tvbox/backups/lists/tmp3/as.m3u | cut -f1 -d " ")"
  11. fun_echo_variable hash_from_file new_hash
  12. if [ "${new_hash}" != "${hash_from_file}" ] # if the hashes are not equal
  13. then
  14. echo $new_hash > "$dir_script/DATA1_as.m3u"
  15. ,speech_en.sh "Playlist in TV box updated"
  16. fi