Skip to content

Instantly share code, notes, and snippets.

@thegreyd
Last active April 20, 2017 16:06
Show Gist options
  • Save thegreyd/10a5820c31822ecc1dd7c0ade96336d3 to your computer and use it in GitHub Desktop.
Save thegreyd/10a5820c31822ecc1dd7c0ade96336d3 to your computer and use it in GitHub Desktop.
Script to Rename/Capitalize files in a folder
#!/bin/bash
#script to capitalize names of markdown files in a folder
#requires python
for mdfile in $(ls *.md)
do
mv "$mdfile" "$(echo "print '$mdfile'.capitalize()" | python)"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment