command exec in expect

diego.veiga at embraer.com.br diego.veiga at embraer.com.br
Fri Nov 12 13:13:27 UTC 2004






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 ;

Does anybody know this?

syntaxe: set machine [ exec echo $arg1$arg2 | cut -d':' -f1 | cut -d'@' -f2
];

arg1=file
arg2=user at machine:path

result:
cut: the delimiter must be a single character
Try `cut --help' for more information.
cut: the delimiter must be a single character
Try `cut --help' for more information.
    while executing
"exec echo $arg1$arg2 | cut -d':' -f1 | cut -d'@' -f2 "
    invoked from within
"set machine [ exec echo $arg1$arg2 | cut -d':' -f1 | cut -d'@' -f2 ]"
    (file "./myscp" line 18)


Diego Brito Veiga


This message is intended solely for the use of its addressee and may
contain privileged  or confidential information.
If you are not the addressee you should not distribute, copy  or file this
message.
In this case, please notify the sender and destroy its contents
immediately.

Esta mensagem é para uso exclusivo de seu destinatário e pode conter
informações privilegiadas e confidenciais.
Se você não é o destinatário não deve distribuir, copiar ou arquivar a
mensagem.
Neste caso, por favor, notifique o remetente da mesma e destrua
imediatamente a mensagem.





More information about the redhat-list mailing list