File: drop-cvs-id

package info (click to toggle)
libaws 20.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,656 kB
  • sloc: ada: 95,505; python: 2,270; ansic: 1,017; makefile: 829; xml: 235; javascript: 202; java: 112; sh: 106
file content (15 lines) | stat: -rwxr-xr-x 255 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python3

import re
import sys

reg = re.compile ('^--  \$Id: .* Exp \$$\n\n', re.MULTILINE)

for J in sys.argv[1:]:
   print (J)
   f = open(J, 'r+w+');
   fl = f.read()
   f.seek(0)
   f.write(reg.sub ('', fl, 1))
   f.truncate()
   f.close()