File: replace

package info (click to toggle)
mathicgb 1.0~git20170104-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,708 kB
  • ctags: 3,297
  • sloc: cpp: 22,171; sh: 217; makefile: 120
file content (11 lines) | stat: -rwxr-xr-x 218 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
echo "Running script \"sed s/$1/$2/\""
for i in 1 2 3; do
  /usr/bin/sleep 1; echo -n .;
done

for f in `ls src/*.cpp src/*.h`; do
  echo "Processing $f";
  sed "s/$1/$2/" < $f > $f.tmp
  mv $f.tmp $f
done