Re: I need a quick script
From: Michael Tosch (eedmit_at_NO.eed.SPAM.ericsson.PLS.se)
Date: 05/18/04
- Next message: Kevin Collins: "Re: Unix groups and file access"
- Previous message: Lee Johnson: "I need a quick script"
- In reply to: Lee Johnson: "I need a quick script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 May 2004 14:59:23 GMT
In article <Xns94ED5E057D100holeejobellsouthnet@216.77.188.18>, Lee Johnson <holeejo@bellsouth.net> writes:
> Gang,
> I need a script/program to run on Solaris 2.6 and Solaris 8 machines which
> will do a simple thing. Pointing at a folder it should travers it and
> build an html table of contents to each index.html it finds below, indented
> properly. Hotlinks would be the folder name where an index.html is
> located. If a folder does not contain an index.html file, but contains
> subfolders which do, it should be displayed in a different color and not
> hotlinked.
>
> Anything out there like that that you have???
>
> Thanks
> Lee Johnson
Something to start with:
#!/bin/sh
find $1 -type d -print |
while read folder
do
if [ -f "$folder"/index.html ]
then
echo 'href="'$folder'" and the other HTML crap I will do myself'
else
echo */index.html | grep '\*' >/dev/null ||
echo 'color="green" '$folder' and I do the HTML crap'
fi
done
-- Michael Tosch IT Specialist HP Managed Services Germany Phone +49 2407 575 313 Mail: michael.tosch:hp.com
- Next message: Kevin Collins: "Re: Unix groups and file access"
- Previous message: Lee Johnson: "I need a quick script"
- In reply to: Lee Johnson: "I need a quick script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|