Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
help with parse error
- X-seq: zsh-users 1442
- From: Timothy J Luoma <luomat+Lists/Zsh/users@xxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: help with parse error
- Date: Tue, 7 Apr 98 19:09:50 -0400
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author