Open and read file line by line tcl tk
2011-04-27 23:02
477 查看
set fhandle [open http://www.com r]
while {[gets $fhandle lyne] > -1} {
set stuff "[lindex $lyne 0] - [lindex $lyne 6]"
puts $stuff
}
exit
--------- Description ---------------------
The program above opens a file in Tcl and reads it line by line
(the two parameter varient of "gets" putting the line into the
variable named as the second parameter.
while {[gets $fhandle lyne] > -1} {
set stuff "[lindex $lyne 0] - [lindex $lyne 6]"
puts $stuff
}
exit
--------- Description ---------------------
The program above opens a file in Tcl and reads it line by line
(the two parameter varient of "gets" putting the line into the
variable named as the second parameter.
相关文章推荐
- Open a file, and then readin a file tcl tk
- Bash Shell read file line by line and substring
- read file by bash shell just as getline() in c++
- read file in kernel (flip_open and flip_close)
- Expect script to read file line by line
- Java 8 Stream – Read a file line by line
- open files in a directory and then find someword in the text tcl tk
- Read in text file line by line php - newline not being detected
- How To Open Physical Standby For Read Write Testing and Flashback
- Golang Read File line by line
- open and read a file content to a variable
- Read and write excel file with format by pandas and xlwt libraries of python
- skip # and blank line read file
- How to read a file line by line?
- Reading and modify OS X plist file by command line
- Shell Script Utility To Read a File Line By Line
- Tcl/TK -- How to read a ini file
- bash read file line by line
- csharp:using OpenXml SDK 2.0 and ClosedXML read excel file
- How to read file line by line?