Skip to content

Instantly share code, notes, and snippets.

@hakeempazhu
Last active March 5, 2019 07:30
Show Gist options
  • Save hakeempazhu/3832f3ec40d7f5d2982c68a9c22132c3 to your computer and use it in GitHub Desktop.
Save hakeempazhu/3832f3ec40d7f5d2982c68a9c22132c3 to your computer and use it in GitHub Desktop.
Removing part of a filename for multiple files on Linux Let it be the part 'STRING' then
for filename in *.mkv;
do [ -f "$filename" ] || continue;
mv "$filename" "${filename//STRING/}";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment