command exec in expect

Mike Klinke mklinke at axsi.com
Fri Nov 12 14:24:02 UTC 2004


On Friday 12 November 2004 07:13, diego.veiga at embraer.com.br wrote:
> Hi guys,
>
> I'm trying to execute this part of a script in expect, but it
> seems that the exec command don't support | or ;

Try without the single quote......

Regards, Mike Klinke


expect1.1> set parsethis "test:one"
test:one

expect1.2> set machine [exec echo $parsethis | cut -d':' -f1];
cut: the delimiter must be a single character
Try `cut --help' for more information.
    while executing
"exec echo $parsethis | cut -d':' -f1"

expect1.3> set machine [exec echo $parsethis | cut -d : -f1];
test
 





More information about the redhat-list mailing list