#!/bin/sh case "$1" in _dir_) if [ "$2" == ".." ] then echo "<- back to upper directory" exit fi if [ -e $3/.dirinfo.txt ] then cat $3/.dirinfo.txt else echo $2 fi ;; *) SIZE=`du -h $3 |awk '{print \$1}'` echo -n "File:" echo -n $2 echo -n "
" echo -n "Size: $SIZE" echo -n "
" ;; esac