我想制作一个定期运行的 shell 脚本来检查和移动我的视频文件(如果它们有关联的字幕)
有点像这样:
sourceDir = "/volume/mount/Videos";
destinationDir = "/volume/mount/VideosWithSubtitles";
validExtensions = ["avi", "mkv", "mp4"]
for every file in sourceDir that has a "validExtension"
check if a file with the same name but with a ".srt" extension exists
if it does, move both of them to "destinationDir"
我不熟悉 shell 脚本,因此感谢您的帮助。