#!/bin/sh

basedir=/afs/andrew/course/15/123/handin/SL/SL1
subj=15123S09-Test
basemail=guna@andrew.cmu.edu
file=email.out
tokenid=guna@andrew.cmu.edu
temp=""

find $basedir > files.out
cat "files.out" | 
while read token
do
  # token f3 is the user ID
  $temp=`cat $token | cut -d"/" -f3` 
  #echo $temp 
  if [ "$tokenid" = "$temp" ]
  then
    echo $token | cut -d"/" -f2,3,4 >> $file 
  fi
done 

#echo "testing" | mailx -s "$subj" "$basemail" 
