Re: Disabling bracket substitution?



On Jan 29, 10:47 pm, Glenn Jackman <gle...@xxxxxx> wrote:
At 2007-01-29 09:28AM, "howard.c" wrote:

A sample of the log file looks like this:
1/22/2007 12:00:27 AM Received SECS message 'S5F1' on Resource
'AMAT_DPS' ; Alarm report send
< L,3
< Binary ALCD = 05 >
< U4 ALID = 398983177 >
< ASCII ALTX = Move Failed for Wafer PodC 10 from llb[1 >

When I read this line into my code with:
puts -nonewline $writechan [lrange $line 4 end-1]\tDon't perform list operation on strings (and vice versa).
Try:
puts -nonewline $writechan [lrange [split $line] 4 end-1]\t


Actually, for what he's attempting to do, it's probably better to:

puts -nonewline [string trim [lindex [split $line =] 1]]

1. It's safer for variable whitespace.
2. It's intent is clearer (the right hand side of "=").

.



Relevant Pages