#!/usr/bin/env bash [[ -z $1 ]] && echo 'Need a filename.' && exit exec mv $1 $(mediainfo $1 | grep Title | head -n1 | cut -d: -f2)