Project ID:
635706
Project Type:
Fixed
Budget:
$30-$250 USD
Project Description:
I need to develop a python script to insert a line into multiple text files to be specified by a wildcard, with line number and the string to insert. please note that the string may have double quotes.
for example, the script can be executed as:
python26 insLine.py *.xml 1 '<?xml version="1.0" encoding="Windows-1252"?>'
this would be used to insert the xml header. please note that the double quotes need to be specified somehow.
Syntax:
python26 insLine.py _filemask _line# '_string to insert'
where _line# can be a number from 1..n, or by writing END which will insert at the end of the file.
Skills required:
Python