From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16488 invoked from network); 7 Nov 2000 19:38:46 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Nov 2000 19:38:46 -0000 Received: (qmail 7626 invoked by alias); 7 Nov 2000 19:38:31 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3514 Received: (qmail 7619 invoked from network); 7 Nov 2000 19:38:29 -0000 From: "Bart Schaefer" Message-Id: <001107113812.ZM13332@candle.brasslantern.com> Date: Tue, 7 Nov 2000 11:38:12 -0800 In-Reply-To: <20001107113047.A32446@stocks.pillory.com> Comments: In reply to "Jack McKinney" "for loop body works, but not when called from for loop..." (Nov 7, 11:30am) References: <20001107113047.A32446@stocks.pillory.com> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: "Jack McKinney" , zsh-users@sunsite.auc.dk Subject: Re: for loop body works, but not when called from for loop... MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.