Skip to content

Instantly share code, notes, and snippets.

@bananu7
Created May 9, 2025 13:58
Show Gist options
  • Save bananu7/15ebb8df365cb45bab53fe9deeef9270 to your computer and use it in GitHub Desktop.
Save bananu7/15ebb8df365cb45bab53fe9deeef9270 to your computer and use it in GitHub Desktop.
#!/bin/sh
type=`head -c3 "$1"`
echo "type: $type"
if [ "$type" = "BZh" ]; then
mv "$1" "$1".bz2
bunzip2 "$1".bz2
if [[ $? -eq 0 ]]; then
echo "$1 succeeded"
else
echo "$1 FAILED"
fi
fi
@bananu7
Copy link
Author

bananu7 commented May 9, 2025

find . -name '*.*' -exec fix.sh {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment