zsh-workers
 help / color / mirror / code / Atom feed
* zpty woes
@ 2008-05-15 12:02 Jaime Vargas
  2008-05-15 13:10 ` Stephane Chazelas
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Jaime Vargas @ 2008-05-15 12:02 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-05-20 16:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-15 12:02 zpty woes Jaime Vargas
2008-05-15 13:10 ` Stephane Chazelas
2008-05-15 13:18 ` Peter Stephenson
2008-05-15 14:50   ` Stephane Chazelas
2008-05-15 15:26     ` Peter Stephenson
2008-05-15 16:25     ` Jaime Vargas
2008-05-15 16:36       ` * " Peter Stephenson
     [not found]     ` <99E8D43E-EC34-48DB-A5AD-BFA197A3AAA3@mac.com>
2008-05-15 17:03       ` Stephane Chazelas
     [not found]       ` <480CEB80051F27AE@mac.com>
2008-05-15 17:38         ` Jaime Vargas
2008-05-15 17:53           ` Jaime Vargas
2008-05-20  3:25             ` Jaime Vargas
2008-05-20 14:28               ` zpty woes (enhancement request) Jaime Vargas
2008-05-20 16:25                 ` Bart Schaefer
2008-05-15 13:26 ` zpty woes Stephane Chazelas
2008-05-15 15:44   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).