It is currently Wed May 23, 2018 4:31 pm

WANTED script to create HTML for TEXT file

All times are UTC - 6 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Tue May 18, 2010 10:12 pm   

Joined: Tue May 18, 2010 9:58 pm
Posts: 1

I require a bash script to read a text file and create a HTML document.

The text file below has some of the titles, bullet points * and data that would need formatting. I would like the script to be able to create the titles of each section in Heading format, then some text in bullet points, some in bold and some in free text.
to do this I am happy to write a character or tag to each line so the script knows how to handle it. i.e <H> heading <B> bold <O> bullet <F> free etc.

I would want the script to loop until each section has been completed in the text file.

Server Name: alpine
Ping status: Ok
Time: 00:05:03
Uptime: 119 days,
Load average:

* 0.17, 0.55, 0.28 (Ok)

Total running process:

* 161

System Information:

* System Manufacturer: IBM
* System Product Name: IBM System x3650 -[7979HSM]-
* System Serial Number: 99F8502

Location Information:

* Server is located in: Auckland

OS Information:

* OS Release: Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
* Kernel Version: 2.6.9-78.0.1.ELsmp
* OS Version: 32bit i686
* Server Build Date: Thu 03 May 2007
* Last Server Update est: Tue 26 Aug 2008 )

CPU Information:

* CPU Vendor: GenuineIntel
* CPU Model: Intel(R) Xeon(TM) MV CPU 3.20GHz
* CPU Speed: 3192.368 MHz
* Number of CPU's: 2
* Number of Cores: 8

RAM status:
Ram/swap status:

* Used RAM: 7417 MB
* Free RAM: 695 MB
* Total RAM: 8113 MB

* SWAP Device: /dev/sda6
* Total SWAP: 4192924 kb

Memory Information:

* There is 6 x 1024MB Installed
* There is 4 x 512MB Installed

Network Information:
Interface Information for: eth1

* IP Address:
* MAC Address: 00:1B:64:18:C9:78
* Netmask Address:
* Broadcast Address:

Interface Information for: eth0

* IP Address:
* MAC Address: 00:1B:64:18:C9:56
* Netmask Address:
* Broadcast Address:

Many thanks in advance.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours

Who is online

Users browsing this forum: Google [Bot] and 14 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group