Home > Expect/TCL, IT Architecture, Programming, SHELL > resolved – how to remove whitespaces in expect – tcl language

resolved – how to remove whitespaces in expect – tcl language

November 15th, 2012

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..

Good Luck!


Comments are closed.