Read block of file in Tcl
- From: "calvin hobbes" <naughtycalvin@xxxxxxxxx>
- Date: 25 May 2005 23:48:59 -0700
Hi,
I have an input file in the following format:
********************************
Name1
Name2
Row1 DEF 001
Row2 ABC DEG 003
Row3 EW EW 002
Row4 FF 0012
Row1 ADEF 1001
Row2 ARBC DEG 2003
Row3 EWW EW 0302
Row4 AB 0112
Name1
Name2
Row1 DSDEF 001
Row2 ABVC DEG 003
Row3 EDW EW 002
Row4 FVF 0012
Row1 AF 1001
Row2 ACRBC DEG 2003
Row3 ESWW EW 0302
Row4 AEB 0112
****************************************
I have to read this file and
--> if I get "Name1" in any of the line,
then I have to read the block of file from "Name1" to the first
occurrance
of "Row4".
--> If I get "Row1" after the above reading is done, then I have to
read
the block of file from "Row1" to the first occurrance of "Row4".
Can anyone help me out in doing this through TCL.
Thanks and regards,
Calvin
.
- Follow-Ups:
- Re: Read block of file in Tcl
- From: Arjen Markus
- Re: Read block of file in Tcl
- Prev by Date: Re: Sticky popup menus
- Next by Date: Re: Read block of file in Tcl
- Previous by thread: TCL/Expect Complier
- Next by thread: Re: Read block of file in Tcl
- Index(es):
Relevant Pages
|