Commite Code
This commit is contained in:
15
Moodle/Tools/envtt.sh
Normal file
15
Moodle/Tools/envtt.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Quét toàn bộ file *.vtt (trừ *.en.vtt và *.vi.vtt) trong thư mục hiện tại và thư mục con
|
||||
find . -type f -name "*.vtt" ! -name "*.en.vtt" ! -name "*.vi.vtt" | while read file; do
|
||||
# Tạo tên file mới bằng cách thay .vtt thành .en.vtt
|
||||
new_file="${file%.vtt}.en.vtt"
|
||||
|
||||
# Copy nội dung sang file mới
|
||||
cp "$file" "$new_file"
|
||||
|
||||
# Hiển thị thông báo
|
||||
echo "Đã tạo: $new_file"
|
||||
done
|
||||
|
||||
echo "Hoàn thành sao chép tất cả các tệp .vtt thành .en.vtt (trừ *.en.vtt và *.vi.vtt)"
|
Reference in New Issue
Block a user