Skip to content

Instantly share code, notes, and snippets.

@patdavid
Created October 4, 2016 14:59
Show Gist options
  • Save patdavid/a7a304cb3471230cb0496cb53e4bc3ef to your computer and use it in GitHub Desktop.
Save patdavid/a7a304cb3471230cb0496cb53e4bc3ef to your computer and use it in GitHub Desktop.
Rename a bunch of files including lines from an external file
while read -u 9 filename; do read -u 8 newname; mv "$filename.mkv" "$filename - $newname.mkv"; done 9<<<"$(ls -1 *.mkv | sed -e 's/\..*$//')" 8< namelist
@patdavid
Copy link
Author

patdavid commented Oct 4, 2016

Append lines from file to the filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment