Skip to content

Instantly share code, notes, and snippets.

@Akczht
Last active December 30, 2024 22:00
Show Gist options
  • Save Akczht/e7f3b67110ba1a948c4851260e45cd9f to your computer and use it in GitHub Desktop.
Save Akczht/e7f3b67110ba1a948c4851260e45cd9f to your computer and use it in GitHub Desktop.
a script to change things from subtitle file ass
#!/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