File: replace

package info (click to toggle)
memtailor 1.0~git20160311-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 288 kB
  • sloc: cpp: 1,103; makefile: 44; sh: 33
file content (11 lines) | stat: -rwxr-xr-x 218 bytes parent folder | download | duplicates (17)
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