command exec in expect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 







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


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux