aboutsummaryrefslogtreecommitdiffstats
path: root/extensions/rename-dups.sh
blob: bd940bc6d0104b71411185f664c39e2b0b340386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

t1=`mktemp`
t2=`mktemp`

ls *.c | tr [A-Z] [a-z] | sort > $t1
cat $t1 | sort -u > $t2
for f in `diff $t1 $t2 | grep "< " | awk -F"< " '{print $2}'`; do
	n=`echo $f | sed -e 's/t_/t_2/g'`;
	"Renaming $f --> $n.";
	p4 integrate $f $n;
	p4 delete $f;
done;

rm -f $t1 $t2