Skip to content

Instantly share code, notes, and snippets.

@aclissold
Created September 21, 2015 23:01
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 aclissold/e4dcd5cb5980b441c609 to your computer and use it in GitHub Desktop.
Save aclissold/e4dcd5cb5980b441c609 to your computer and use it in GitHub Desktop.
Rename <num>.c <num>/main.c
#!/bin/bash
for f in $(ls *.c)
do
echo $f
dir=$(echo $f | sed -e 's/.c//g')
mv $f $dir/main.c
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment