From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20909 invoked from network); 7 Apr 1998 23:37:33 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Apr 1998 23:37:33 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id TAA06180; Tue, 7 Apr 1998 19:14:29 -0400 (EDT) Resent-Date: Tue, 7 Apr 1998 19:10:20 -0400 (EDT) Message-Id: <199804072309.TAA06142@luomat.peak.org> Content-Type: text/plain MIME-Version: 1.0 From: Timothy J Luoma Date: Tue, 7 Apr 98 19:09:50 -0400 To: zsh-users@math.gatech.edu Subject: help with parse error Resent-Message-ID: <"y9dg42.0.LV1.S9hAr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1442 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu What is wrong with this recipe? verify () { for i in "$*" do if [ -r "$i" ] then cd `dirname $i` shortname=`basename $i` md5sum "$shortname" > "$shortname.md5sum" echo "Verified $shortname to $shortname.md5sum" else echo "Can't find $i" fi done } Here's what happens when I enter it on the commandline: verify () { function> for i in "$*" function for> do function for> if [ -r "$i" ] function for if> then function for then> cd `dirname $i` function for then> shortname=`basename $i` function for then> md5sum "$shortname" > "$shortname.md5sum" function for then> echo "Verified $shortname to $shortname.md5sum" function for then> else function for else> echo "Can't find $i" function for else> fi function for else> done zsh: parse error near `done' I'm sure it's obvious.... but I've been looking at it and it makes no sense to me... TjL