1<?php
2
3$dirs = glob('./src/*');
4
5foreach ($dirs as $d) {
6    $files = glob($d.'/*.c');
7    foreach ($files as $f) {
8        `git mv $f {$f}c`;
9    }
10}