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!

Read specific line from files

Status
Not open for further replies.

zzari

Technical User
Oct 17, 2014
1
IT
Hi everybody, this is my first time using Tcl/Tk and i have a problem working on a txt file.
My input file is a mix of word and numbers in this way:
- the first 5 lines are words
- a various number of lines of numbers (2 column for each line)
- last 6 lines of words.

example:

aaaaaaaaaaaaaa
bbbbbbbbbbbbbbb
ccdcccccccccccccc
ddddddddddddddd
eeeeeeeeeeeeee
1 2
3 4
5 6
8 9
aaaaaaaaaaaaaaaa
ddddddddddddddd
fffffffffffffffff
rrrrrrrrrrrrr
ggggggggggggggggggg
hhhhhhhhhhhhhhh

I want to read and copy on a new file just only the numbers.
Is there anyone that could help me with a simple code?
txs in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top