14 lines
309 B
Python
14 lines
309 B
Python
#!/usr/bin/env python
|
|
|
|
import fileinput, sys
|
|
|
|
fname, start, count = sys.argv[1:4]
|
|
start, count = int(start), int(count)
|
|
|
|
for line in fileinput.input(fname, inplace=1, backup='.orig'):
|
|
if start <= fileinput.lineno() < start + count:
|
|
pass
|
|
else:
|
|
print line.rstrip("\n")
|
|
fileinput.close()
|