You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
547 B
19 lines
547 B
#!/bin/bash
|
|
|
|
# Function to check attachments in a file
|
|
check_attachments() {
|
|
local file="$1"
|
|
# Use mkvinfo to get the details of the file, specifically looking for 'attachments'
|
|
if ! mkvmerge -i "$file" | grep -q "Attachment"; then
|
|
# If there are no attachments, print the filename
|
|
echo "$file"
|
|
fi
|
|
}
|
|
|
|
# Export the function so it can be used with find
|
|
export -f check_attachments
|
|
|
|
# Recursively find all .mkv files and check for attachments
|
|
find . -type f -name "*.mkv" -exec bash -c 'check_attachments "$0"' {} \;
|
|
|