source: trunk/minix/commands/httpd/dir2html.sh@ 21

Last change on this file since 21 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 546 bytes
Line 
1# dir2html.sh by Michael Temari 03/03/96
2#
3#!/bin/sh
4if [ $# != 0 ]
5then
6cd $1
7fi
8dname=`pwd`
9fdname=$2
10if [ $dname != / ]
11then
12 dname=${dname}/
13fi
14echo "<HTML>"
15echo "<TITLE>"
16echo Directory of $fdname
17echo "</TITLE>"
18echo "<H1>"
19echo Directory of $fdname
20echo "</H1>"
21echo "<HR>"
22#
23ls $dname |
24{
25while read fname
26do
27lname=$fdname$fname
28echo "<H3>"
29echo -n "<A HREF=\""
30echo -n $lname
31echo -n "\">"
32echo -n $fname
33echo "</A><BR>"
34echo "</H3>"
35done
36}
37echo "<HR>"
38echo "<H6>"
39echo Directory Generated at `date`
40echo "</H6>"
41echo "</HTML>"
42exit 0
Note: See TracBrowser for help on using the repository browser.