- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: scripting query - making the output look good....
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2007 09:31 PM
тАО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
document.....sorry!!!
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".
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2007 09:42 PM
тАО03-21-2007 09:42 PM
Re: scripting query - making the output look good..
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2007 09:54 PM
тАО03-21-2007 09:54 PM
Re: scripting query - making the output look good..
How about the "banner" command? Something like
banner `hostname`
before you start each new server would definitely identify each.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2007 10:08 PM
тАО03-21-2007 10:08 PM
Re: scripting query - making the output look good..
Thanks tho
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2007 10:57 PM
тАО03-21-2007 10:57 PM
Re: scripting query - making the output look good..
That's me - a simple, primitive sort of guy - I though I should mention it, in any case.
Pete
- no points, please -
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2007 10:59 PM
тАО03-21-2007 10:59 PM
Re: scripting query - making the output look good..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2007 11:27 PM
тАО03-21-2007 11:27 PM
Re: scripting query - making the output look good..
do a formatted output with perl, see link:
http://www.webreference.com/programming/perl/format/
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2007 12:16 AM
тАО03-22-2007 12:16 AM
Solution***********
%%%%%%%%%%%
===========
+++++++++++
-----------
___________
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:
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch0...
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.
Bill Hassell, sysadmin