- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: (Think tank) Scripting question
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
Forums
Discussions
Discussions
Discussions
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
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
01-16-2002 11:25 AM
01-16-2002 11:25 AM
Thanks in advance,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2002 11:39 AM
01-16-2002 11:39 AM
Re: (Think tank) Scripting question
You can use thiese options in lp command
with o option
-oi for italic
-olandscape for landscape
-oweight3 for bold
for exapmple
lp -d
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2002 11:51 AM
01-16-2002 11:51 AM
Re: (Think tank) Scripting question
http://hpux.connect.org.uk/hppd/hpux/Gnu/enscript-1.6.1/
To print 2 pages on 1 page and in landscape,
enscript -r -2 -P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2002 06:33 AM
01-28-2002 06:33 AM
Re: (Think tank) Scripting question
I can print landscape fine.
I don't want to print the whole report in bold, just certain header parts inside the report.
I can't think of any way to accomplish this.
Maybe someone else has some ideas, without me having to import it to a word processor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2002 06:41 AM
01-28-2002 06:41 AM
SolutionI use the following functions within a script to underline or make bold certain characters:
function underline
{
echo $*|awk '{ for (i=1;i<=length($0);i++)
{ printf ("_\b%s",substr($0,i,1)) }
}'
}
function make_bold
{
echo $*|awk '{ for (i=1;i<=length($0);i++)
{ printf ("%s\b%s\b%s\b%s",substr($0,i,1),substr($0,i,1),substr($0,i,1),substr($0,i,1)) }
}'
so to use it, I'd have something like:
...
/etc/lvdisplay $I | grep -q -i stale
if [ $? -eq 0 ] ; then
echo `make_bold Warning` - LV $I has stale extents
fi
...
in my script, the output would get sent to the printer with "Warning" in bold, the rest normal.
Not sure about italic, I'd have to do some digging.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2002 06:48 AM
01-28-2002 06:48 AM
Re: (Think tank) Scripting question
This is a little tricky. The simple answer is that you need to include the escape sequences in the data stream. The tricky part is that the escape sequeneces differ from printer model to printer model/manufacturer.
There are several commercial products that will do what you want. One is called UnForm. http://www.unform.com. You can also search the
HP-UX Porting Centre for text processing. Another method would be to embed commands like [Italics]
[Italics Off]
[Bold]
[Bold Off]
within your text data stream and then write a post-processor in awk or perl to substitute the appropriate escape sequences in the output stream. My weapon of choice would be UnForm but I've already bought it.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 11:39 AM
02-01-2002 11:39 AM
Re: (Think tank) Scripting question
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 11:42 AM
02-01-2002 11:42 AM
Re: (Think tank) Scripting question
http://hpux.cs.utah.edu/
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2002 11:42 AM
02-01-2002 11:42 AM