#!/bin/sh
#
# MALCOM X -- The heart of Malcom
#             Written by Sketch the Shell Cow, April, 1998
#
# This was just written so I wouldn't have to remember to do an input
# redirect when executing malcom. By getting called, all this thing has
# to do is just the middle part while all the redirection is done by 
# malcom.sh.

echo "<TABLE WIDTH=100%>"
echo "<TR><TD BGCOLOR=#00FF00><FONT COLOR=#000000><B>Filename</B></FONT><TD BGCOLOR=#00DD00><FONT COLOR=#000000><B>Size</B></FONT><TD BGCOLOR=#00AA00><FONT COLOR=#000000><B>Description of the Textfile</B></TR>"

while read FILE DESCRIPTION
      do
      echo "<TR><TD>"
      echo "<A HREF=\"$FILE\">$FILE</A>"
      if [ -f "$FILE" ]
         then
         echo "<TD ALIGHT=RIGHT TEXT=#99FF99>"
         echo "`ls -l $FILE | awk '{print $4}'`"
         else
         if [ -d "$FILE" ]
            then
            echo "<TD><I><B>DIRECTORY</B></I>"
            else
            echo "<TD>"
            echo "<B>MISSING</B>"
          fi
       fi
      echo "<TD TEXT=\"#00DD00\">"
      echo $DESCRIPTION
      echo ""
      done
  
echo "</TABLE>"
