Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: for loop body works, but not when called from for loop...



On Nov 7, 11:30am, Jack McKinney wrote:
> Subject: for loop body works, but not when called from for loop...
> 
> for i in $(find . -name \*.pgp | fgrep -v ring.pgp) ; do ;
> echo $i ; pgp -fd -z "My passphrase" < $i |
> gpg --passphrase-fd 3 --batch -c 3<<< "My passphrase" > ${i%pgp}gpg ; done
> 
>     When I run it, it echoes the first file it finds, and creates the .gpg
> file (since it is stdout of one of the commands).  However, the file never
> gets any data in it.  [...] the echo command echoes the correct filename
> (./test.pgp), but it just hangs there.

What version of zsh are we talking about?

Are you typing out that loop at a shell prompt, or is it in a script?  If
the latter, what else is in the script?  When you run the non-loop trial,
is everything the same except for the loop?

What happens if you run the loop version, and type control-D to send it an
EOF when it seems hung?

Something must be waiting for input.  I don't know exactly what, or whether
it might have something to do with file descriptor 3.



Messages sorted by: Reverse Date, Date, Thread, Author