- This topic has 1 reply, 2 voices, and was last updated 16 years, 2 months ago by .
-
Topic
-
Hi I have a question about
getstcl command I have a tcl script to search through SMAT files
I use this code :
set f [ open filename ]
while { 1 } {
set rc [ gets $f rec ]
if { $rc< 0 } {break } puts $rec } close $f
It works fine
then I decided to use the same script to read input not from the file
but from the pipe
cat filename | myscriptMy code in this case :
while { 1 } {
set rc [ gets stdin rec ]
if { $rc< 0 } {break } puts $rec } I noticed in this case
getsconverts all r to n which is not the case when it reads from file
Is it a way to control this behavior and disable this convertion?
Thanks
Viewing 0 reply threads
Viewing 0 reply threads
- The forum ‘Tcl Library’ is closed to new topics and replies.