Sponsored Content
Top Forums Shell Programming and Scripting Linux Script create index.html file Post 302456709 by seashell11 on Saturday 25th of September 2010 10:56:39 AM
Old 09-25-2010
Linux Script create index.html file

I need a script that can do this:
  • A script that searches all directories and subdirectories for .html files
  • When a .html file is found it creates a index.html file in that folder.
  • It then edits the index.html file and inserts links to all of the .html files that are in that folder into the body.
  • If no .html files are found, it searches for folders.
  • It then creates a index.html file with links to all of the folders.

What would be the best way to do this? Do you need more information?

Thank You
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

which access right should set in my webpage index.html ?

I have a webpage, http://my.dns.com/~zp523/index.html, I want all people to have read and execute privileges. I want to extend it with execute privilege. Which command should be used in chmod? is it only give read(r) & execute(x) parameter in 'chmod ??? index.html' thk a lot!! (1 Reply)
Discussion started by: zp523444
1 Replies

2. Filesystems, Disks and Memory

why the inode index of file system starts from 1 unlike array index(0)

why do inode indices starts from 1 unlike array indexes which starts from 0 its a question from "the design of unix operating system" of maurice j bach id be glad if i get to know the answer quickly :) (0 Replies)
Discussion started by: sairamdevotee
0 Replies

3. Shell Programming and Scripting

Create a html file if a process is running??

Hi All, I need to check for a process, if the process is running then I have to create an HTML file, say A.HTML. If the process is not running then I have to rename the existing html, say A.HTML to B.HTML so that the process which looks for the file A.HTML does not find it? How do I do... (1 Reply)
Discussion started by: Hangman2
1 Replies

4. Shell Programming and Scripting

help with a bash script to create a html table

Hi guys as the title says i need a little help i have partisally written a bash script to create a table in html so if i use ./test 3,3 i get the following output for the third arguement in the script i wish to include content that will be replace the A characters in the... (2 Replies)
Discussion started by: dunryc
2 Replies

5. UNIX for Dummies Questions & Answers

create table file from different files with index

Hi, I've several files with two collumns, where first collumn can be used as index. filename1 and filename2 how to create a file I should start with cat all files and extract first collumn to create an index? (4 Replies)
Discussion started by: sargotrons
4 Replies

6. AIX

How to Use a UNIX Shell Script to Create an HTML Web Page?

dear friends , in my work i have to monitor some system performance in hourly basis by runing some commands , for example (lpstat) to know that all the queue is ready how can i create webpage and connect it with the server (AIX operating system) and make this page refreshed every 10 second and... (12 Replies)
Discussion started by: rami abusweilei
12 Replies

7. UNIX for Dummies Questions & Answers

Trying to execute a script to populate all directories with index.html

Hello, I am trying to create a php file that would copy given index.html file to all directories (and subdirectories) on my site that don't have one. This is to prevent directory listings on nginx. This index.html file is placed in the /populate directory and looks like this: <html> <head>... (7 Replies)
Discussion started by: teletubby
7 Replies

8. Shell Programming and Scripting

Attach multiple index.html file using mutt

Hi I want to attach multiple index.html, index_v2 file using mutt command basically i want first index.html and then index_v2.html file as a body in email , these html files are test reports I am using following command , but it is over writing , any help appreceated ;) mutt -e... (2 Replies)
Discussion started by: madankumar.t@hp
2 Replies

9. Shell Programming and Scripting

Read log file to create Performance index

I am required to create a CSV file reading last 200000 lines form a log file. I have to grep 3 parameters from this log file and write these parameters in the .csv file, with time stamp. This script will be setup in a cron job which will run every 10 minutes. I have written the script but it is... (5 Replies)
Discussion started by: Crazy_Nix
5 Replies

10. UNIX for Beginners Questions & Answers

Create html <ui> <li> by parsing text file

Hi you all, this is my first post in this forum. I'm italian (please forgive me) :-) so my english will fail to be correct... Anyway, let's get straight to the point! I have a text file like this: ,,,, Disney: 00961-002,,,, ,Pippo: 00531-002,,, ,,Pluto: 00238-002,, ... (5 Replies)
Discussion started by: alcresio
5 Replies
HLINS(1)						      General Commands Manual							  HLINS(1)

NAME
hlins - insert url's into html documents SYNOPSIS
hlins [options] [infile] DESCRIPTION
hlins is a program that inserts hypertext links into html documents, according to one or several data bases associating addresses (url's) to names. hlins is designed for inserting links for persons: It knows about abbreviations of first and middle names and tolerated dropping of the last part of a composite last name. If no file argument is given then input is taken from stdin; when no output option (see below) is given then output goes to stdout. For a complete description, see the documention in html format. OPTIONS
hlins follows the usual GNU command line syntax, with long options starting with two dashes (`--'). -o, --output-file file Write to file instead of standard output -h, --help Show a summary of options. -v, --version Show the version of the program. -q, --quiet Surpress diagnostic output. -db, --data-bases files ... Use files ... as data bases -m, --modify files ... Dont't act as filter but perform in-pace modifications of files. -R, --recursive Recursively descend into directories and act on all files with names ending on .html. -td, --tmp-dir dir Use directory dir to create temporary files. --db-to-html List the address data bases in HTML format to stdout. ENVIRONMENT
TMPDIR default directory for creating temporay files. VERSION
This manual pages describes version 0.39. SEE ALSO
The full documentation with examples should be available in /usr/share/doc/hlins/. See also the hlins home page http://www.lsv.ens-cachan.fr/~treinen/hlins/. AUTHOR
Ralf Treinen <treinen@debian.org>. July 25, 2000 HLINS(1)
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy