03-21-2007 09:31 PM
I have written a nice little script (If I say so myself) which goes around all of the unix servers and brings back disk firmware, PDC revisions, Diagnostics revision and so on. It then outputs a number of lines for each server saying if action needs to be taken. The output content is exactly as I wish but I would like to make it more presentable and it will probably end up in a word
Basically this is a bit longwinded all I'm after is a good way of putting a header on each servers output so there is clear seperation. I can echo some hashes but wondered if anyone had a way of making the header look a bit better. Particularly if they are going to be pasted into a word doc....ha ha".
Solved! Go to Solution.
03-21-2007 09:42 PM
The first is to make your document a .rtf file. If you look at a .rtf in a text editor you can see that it is readable and contains simple tags to format the data.
The second idea to to make your document a web page by using HTML tags - really simple, plus you can put your system info onto an intranet site with links to (a) recreate your documentation
(b) check for differences and display them.
Thats is what I have done.
By the way, there is a script called nickel which gives you excellent web page formatted system descriptions. I think you can get it from the porting centre, but I got it from the HP response centre.
03-22-2007 12:16 AM
Noe the above illustrates the very first problem: proportional fonts. The ITRC uses common HTML code to accept the post that I made with a fixed spacing font like Courier. But you're reading the posting in a proportional font. So even though all 6 lines are exactly the same number of characters, they do not appear to be lined up. This becomes a *BIG* problem with tables such as bdf or cstm, etc. Here is a very nicely lined up bdfmegs listing (shown in ITRC proportional font):
bdfmegs -l /
File-System Mbytes Used Avail %Used Mounted on
/dev/vg00/lvol1 292 44 219 17% /stand
/dev/vg00/lvol3 288 138 149 48% /
/dev/vg00/lvol5 24 2 21 10% /oldhome
/dev/vg00/lvol6 1344 1288 56 96% /opt
/dev/vg00/lvol7 1592 1302 288 82% /usr
/dev/vg00/lvol8 4600 3931 664 86% /var
This looks great on my terminal screen but lousy in this posting -- and will look lousy in Word or any other word processor. ASCII boxes look good:
| test |
(in a fixed spacing font).
So the first step is to define a format to control the font -- The easiest is HTML where you can use
...to set a fixed font. Other markup languages such as nroff have a steep learning curve, and rtf looks something like this in Notepad:
As mentioned, Nickel is a great tool that produces HTML from many different sources on an HP-UX machine and it's all standard POSIX shell stuff. Nickel has disappeared from the standard HP Response Center ftp site so I have attached a copy. The output is very generic HTML that can be moved to any web server.