1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-24 20:38:36 -06:00

fix: Remove extension for mkv

This commit is contained in:
Sayantan Santra 2023-11-11 03:16:00 -06:00
parent 7cc78461f3
commit 25e6944fc9
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -7,7 +7,7 @@
for f in *.mp4 *.mkv; do
if [ -f "$f" ]; then
h=$(basename "$f" .mp4)
h="${f%.*}"
echo "Renaming the subtitle (if any) accompanying $h.mp4..."
n=$(find . -maxdepth 2 -name "*.srt" -printf '.' | wc -m)
if [ $n -eq 1 ] && ! [ -f "$h.srt" ]; then