Register
It is currently Tue Sep 30, 2014 11:52 am

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
Hello,

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: 172.109.184.19
* MAC Address: 00:1B:64:18:C9:78
* Netmask Address: 255.255.248.0
* Broadcast Address: 172.109.191.255

Interface Information for: eth0

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

Many thanks in advance.


Top
 Profile  
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: No registered users and 29 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
© 2003 - 2011 USA LINUX USERS GROUP