File: replace_post_pre_iterators.sh

package info (click to toggle)
mrpt 1%3A0.9.0-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 67,116 kB
  • ctags: 65,525
  • sloc: cpp: 360,820; ansic: 73,282; sh: 278; makefile: 154; python: 75; xml: 50
file content (15 lines) | stat: -rwxr-xr-x 320 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

#
# Careful: this script changes "it++,i++" to "++it++,i"
#

LST1=$(find . -name '*.cpp') 
LST2=$(find . -name '*.cxx') 
LST3=$(find . -name '*.h') 
LST4=$(find . -name '*.hpp')

for fl in $LST1 $LST2 $LST3 $LST4;do
	cat $fl | sed '/.*for.*iterator/ s/\([a-z,A-Z]*\)++/++\1/g' > A.tmp && mv A.tmp $fl
done