Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add header row to a text file

Status
Not open for further replies.

lauriesamh

Technical User
Sep 1, 2004
119
US
I'm new to TCL and need to add a header row to the first line in a text file as it is processed within Cloverleaf interface engine.
Example input file
000
001
002
000
001
002

Required output:
"This is the test file for ABC"
000
001
002
000
001
002
 
Thanks, one question the file name is not known and between each set of 000 through 0003 there is a newline. Would this still work?
 
Hi

lauriesamh said:
the file name is not known
Then how would the script find out which file to modify ?

lauriesamh said:
between each set of 000 through 0003 there is a newline.
Well, newline should be between every two lines, otherwise they would not be separate lines. But as it sounds for now, that should not be a problem.


Feherke.
[link feherke.github.com/][/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top