Last active
December 30, 2024 22:00
-
-
Save Akczht/e7f3b67110ba1a948c4851260e45cd9f to your computer and use it in GitHub Desktop.
a script to change things from subtitle file ass
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 | |
set -e | |
# Directory to process (current directory) | |
DIRECTORY="$PWD" | |
# Loop through all .ass files in the directory | |
for file in "$DIRECTORY"/*.ass; do | |
# Check if the file exists (to avoid issues if no .ass files are present) | |
if [[ -f "$file" ]]; then | |
echo "Processing: $file" | |
# Use sed to replace "Arial" with "Remi Script" and save changes in-place | |
sed -i '' 's/Arial/Remi Script/g' "$file" | |
echo "Updated font in $file" | |
else | |
echo "No .ass files found in $DIRECTORY." | |
fi | |
done | |
echo "Font replacement completed." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment