![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| reading text file line by line | MizzGail | Shell Programming and Scripting | 6 | 04-14-2008 03:58 AM |
| Line by line file reading... and more! | ProFiction | Shell Programming and Scripting | 6 | 07-26-2007 08:32 AM |
| reading each line from a file | ragha81 | Shell Programming and Scripting | 5 | 04-13-2007 05:25 PM |
| Reading line by line from a file | tej.buch | Shell Programming and Scripting | 2 | 01-22-2006 11:50 PM |
| Reading line by line from file. | akpopa | UNIX for Dummies Questions & Answers | 4 | 08-30-2001 07:20 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Reading line from file - TCL
I Have output of ps -ef in file. while reading from file, it reads one word but i want to read the full line.
Is there any way to set IFS in TCL as we set in Shell. Thanks Ajay Kumar |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
The following peice of code will read and print out the contents of a file line by line:
Code:
set f [open somefile.txt]
while {1} {
set line [gets $f]
if {[eof $f]} {
close $f
break
}
puts "Read line: $line"
}
|
|
#3
|
|||
|
|||
|
Thanks sysgate, it works
|
|||
| Google The UNIX and Linux Forums |