Last active
June 18, 2026 12:54
-
-
Save Golumpa/89e3d3eeb810d7f8f539b61cffe5b29b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This simple bash script adds a CRC32 to the end of every file in a chosen folder. It will not add them recursively. | |
| # This script needs libarchive-zip-perl (Debian based), perl-Archive-Zip (Red Hat based) installed to be able to run. | |
| # Change this to the folder that have files you want to add CRC32's to. | |
| home="FolderName" | |
| # This filters out those files you want to add a CRC32 to. | |
| ext="mkv" | |
| while read a; do | |
| i=`basename "${a}"`; | |
| crc=`crc32 "${home}/${i}" | awk '{print toupper($0)}'`; | |
| mv "${home}/${i}" "${home}/${i%%.*} [${crc}].${ext}"; | |
| done < <(find "${home}/" -type f -name \*.${ext}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment