summaryrefslogtreecommitdiff
path: root/rename-identifiers.sh
blob: 7c1a2ef6656fcd352887b26bd815da76a388470d (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

SEDFILE=`mktemp`

awk '$0 !~ /^#.*/ && (NF == 2) { print "s/\\(^\\|[^A-Za-z_]\\)\\(" $1 "\\)\\($\\|[^A-Za-z0-9_]\\)/\\1" $2 "\\3/g" }' $1 > $SEDFILE 

shift
sed -f $SEDFILE -i $*
rm $SEDFILE