#!/usr/bin/env bash mkvextract "$1" attachments $(mkvmerge --identify "$1" | grep "Attachment ID" | sed "s/Attachment ID \([0-9]*\): .*/\1/")