Hi linuxforums.org
just want shortly introduce myself to u. im simon, 22 years old and studying
the problem: my stupid script does not want to work as i wish it to.

Well, the following script tells me(launching it) that there are syntax errors.

Code:
#! /usr/bin/ksh


function travdir
{
        for k in $(ls -l $1)
                do
                        if test -f $k
                                then
                                        overname=$()
                                        abosutname=$($1/$k)
                                        if test $overname = $2
                                                then
                                                        print "$overname"
                                                        print "$absolutname"
                                                        print "Möchten sie die Datei löschen? y/n"
                                                        read answer
                                                        case $answer in
                                                        y)
                                                                        if rm $1/$k
                                                                                then
                                                                                        print "Erfolgreich gelöscht"
                                                                        else
                                                                                print "$overname >> $1/logfile"
                                                                                print "$absolutname >> $1/logfile"
                                                                         fi
                                                                                ;;
                                                                n)
                                                                        print "Abbruch durch User
                                                                        ;;
                                                                *)
                                                                        print "Eingabe nicht korrekt"
                                                                        ;;
                                                        esac
                                        fi
                        elif test -d $k
                                then
                                        overname=$(ls -ld $1 | cut -c 14-18)
                                        absolutname=$($1/$k)
                                        if test $overname = $2
                                                then
                                                        print "$absolutname"
                                                        print "$overname"
                                                        print "Möchten sie das Verzeichnis löschen? y/n "
                                                        read anser
                                                        case $answer in
                                                                y)
                                                             
                                                                       if rmdir $1/$k
                                                                                then
                                                                                        print ""erfoglreich gelöscht"
                                                                        else
                                                                                print "$overname >> $1/logfile"
                                                                                print "$absolutname >> $1/logfile"
                                                                        fi
                                                                        ;;
                                                                n)
                                                                        print "Abbruch durch Benutzer"
                                                                        ;;
                                                                *)
                                                                        print "Eingabe nicht korrekt"
                                                                        ;;
                                                        esac
                                                else
                                                        travdir $1/$k $2
                                        fi
                        else
                                print "total 12"
                        fi
                done
        return
}

read startdir
user=$USER

travdir $startdir $user
./findcuckoo: syntax error at line 26: `;;' unexpected

im having a similar problem with another script i wrote. so maybe, if u got some time, check the script for mistakes etc.

btw it is supposed to find files within my homedirectory owned by other users.
its a preparation for my examens, so its no homework or sth like that. its just to practise.

regards and thx. simon