Skip to content

Instantly share code, notes, and snippets.

@bumaociyuan
Created October 25, 2014 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bumaociyuan/399ca4a371937046b694 to your computer and use it in GitHub Desktop.
Save bumaociyuan/399ca4a371937046b694 to your computer and use it in GitHub Desktop.
rename files extension
#! /bin/bash
cd `dirname $0`
files=$(find . -name *markdown)
echo $files
for file in { $files }
do
echo $file
fileWithoutUnderbar=${file%markdown}
echo $fileWithoutUnderbar'md'
mv $file $fileWithoutUnderbar'md'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment