resolved – how to remove whitespaces in expect – tcl language
Here's the way to remove whitespaces automatically when using expect/tcl language:
If $line is the string variable that you wanna remove whitespaces, just replace $line with the following in your programs context:
[string trim $line]
That's it, simple, Ehh..