Re: I need a quick script

From: Michael Tosch (eedmit_at_NO.eed.SPAM.ericsson.PLS.se)
Date: 05/18/04


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


Relevant Pages

  • Re: Turner Audio website being re-furbished.
    ... > Before you fuck up again, Patrick, a) correct the spelling of Mozart's ... > single folder. ... Then i had a lot of other html pages linked off a folder called webpgs.html, ... > ISP where your site will be available to the public. ...
    (rec.audio.tubes)
  • Re: How do I Save from MHTML .mht to HTML format only
    ... The issue was the difference between html and htm on the index folder so I ... I also notice that your host says you have to use the .html extension for ... Double check that you did indeed upload to the ...
    (microsoft.public.publisher.webdesign)
  • Re: What are these??
    ... SetupHlp.cmd that copies altsvc to the Windows\System32 ... ntdll.dll file which should be in the Windows\System32 folder, ... Only open HTML documents with Notepad. ... > There has been no apparent effect of shifting both msthost and altsvc out ...
    (microsoft.public.windowsxp.general)
  • Re: What are these??
    ... SetupHlp.cmd that copies altsvc to the Windows\System32 ... ntdll.dll file which should be in the Windows\System32 folder, ... Only open HTML documents with Notepad. ... > There has been no apparent effect of shifting both msthost and altsvc out ...
    (microsoft.public.windowsxp.perform_maintain)
  • Having problems with the search feature in Windows XP
    ... Today I tried to search for web pages or HTML pages added to my Favorites ... folder in Internet Explorer between certain dates. ... Favorites folder are found alright but not favorite html documents. ...
    (microsoft.public.windowsxp.general)