#!/mclab/imc/sun4/rexx -x httpdir="/usr/local/etc/httpd/htdocs/oucl/users/ian.collier" /* This is the root directory of my WWW pages */ outdir=httpdir || '/RexxSource' /* directory in which all files reside */ outfile=outdir || '/index.html' /* the file which will be output */ address command "rm" outfile /* This program prints some text and then a list of files. The text must end with a comment delimiter on a line of its own. */ call print /* Source files

Source Files

All files in this directory follow, with their sizes and dates. The file "index.html" will not be included, however, and neither will files starting with ".".

Files:

Name                    Size  Last Updated

*/ /* This code outputs the list of files. The list comes from "ls". */ list='ls'('-lL',outdir) do while list^=='' parse var list perm linx usr size mon date time name '0a'x list if name='' | name=='index.html' then iterate call lineout outfile,'' || name || '' ||, copies(' ',20-length(name)) right(size,7) || ' ' ||, mon right(date,2) right(time,5) end /* This code outputs the trailing lines of the file. */ call lineout outfile,"

" parse value date(s) with yyyy +4 +2 dd call lineout outfile,"This list was last updated on", dd+0 date('m') yyyy+0 || "." call print /*


A link to the previous or home page would usually appear here. */ exit print: procedure expose sigl outfile do i=sigl+1 while sourceline(i)\="*/" call lineout outfile,sourceline(i) end return