Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zpty woes
- X-seq: zsh-workers 25033
- From: Jaime Vargas <jev@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: zpty woes
- Date: Thu, 15 May 2008 08:02:04 -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
In the script attached, when trying to follwing line always fails.
zpty -r scppty line "*:" || echo "no password asked" && exit
It appears that the "password" string from the ssh session is discarded
by the psuedo terminal.
Is there a way to fix this? or Am I missing something?
Thanks,
Jaime
#SCRIPT FOLLOWS
#!/bin/zsh -x
zmodload zsh/zpty
zpty scppty scp hello.world luser@host:~/
zpty -t scppty || echo "something went wrong" && exit
zpty -r scppty line "*:" || echo "no password asked" && exit
zpty -w scppty "TopSecret"
while zpty -r scppty line;
do
result+="$line"$'\n'
done
zpty -d scppty
print $result
Messages sorted by:
Reverse Date,
Date,
Thread,
Author