#!/bin/sh # # SH_KIT # # list.sh = Directory & File Listing # # by: The Dark Raver # modified: 16/12/2005 # echo Content-Type: text/html echo if [ "$QUERY_STRING" != "" ] then echo PATH: $QUERY_STRING "

" echo `ls $QUERY_STRING` > /tmp/test else echo PATH: / "

" echo > /tmp/test QUERY_STRING="/" root="1" fi out=`grep "/" /tmp/test` if [ "$out" != "" ] then echo FICHERO: $QUERY_STRING echo "
"
    cat $QUERY_STRING
  else
    if [ "$root" != "1" ]
      then
      echo "( ) ".."
" fi for i in `ls $QUERY_STRING` do if [ "$root" == "1" ] then echo "( ) "$i"
" else echo "( ) "$i"
" fi done fi