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
Uptime: 119 days,
* 0.17, 0.55, 0.28 (Ok)
Total running process:
* System Manufacturer: IBM
* System Product Name: IBM System x3650 -[7979HSM]-
* System Serial Number: 99F8502
* Server is located in: Auckland
* 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 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
* Used RAM: 7417 MB
* Free RAM: 695 MB
* Total RAM: 8113 MB
* SWAP Device: /dev/sda6
* Total SWAP: 4192924 kb
* There is 6 x 1024MB Installed
* There is 4 x 512MB Installed
Interface Information for: eth1
* IP Address: 18.104.22.168
* MAC Address: 00:1B:64:18:C9:78
* Netmask Address: 255.255.248.0
* Broadcast Address: 22.214.171.124
Interface Information for: eth0
* IP Address: 126.96.36.199
* MAC Address: 00:1B:64:18:C9:56
* Netmask Address: 255.255.255.0
* Broadcast Address: 188.8.131.52
Many thanks in advance.