Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Bold text in UNIX and Windows
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Walter Usyk  
View profile  
 More options Nov 2 2001, 10:19 pm
Newsgroups: comp.lang.perl.misc, comp.lan.perl.moderated, comp.lang.perl.modules, comp.lang.perl.tk, comp.lang.perl
From: Walter Usyk <u...@home.com>
Date: Sat, 03 Nov 2001 03:19:56 GMT
Local: Fri, Nov 2 2001 10:19 pm
Subject: Bold text in UNIX and Windows
I was wondering if it is possible to do output the following line of
text with some bold words inside of the text output. I need to do this
in UNIX and Windows:

I would like to display the following :

28-Nov.16:04   DBUZULOI    branch type "dbuzuloi_ott.20" (locked)

If anyone is familiar, this is the way ClearCase does it for their
command output.

I tried using the ANSIColor package but it only works in UNIX and in
Windows NT I got fuuny looking results like this:

F:\Downloads\Perl>perl color.pl
?[31mDanger, Will Robinson!
?[0mThis is just normal text.
?[1mDo you hurt yet?
?[0m?[31;40mvenom lack
?[31;43mkill that fellow
?[32;46;5mgarish!
?[0m?[31;40mvenom lack
?[0m?[31;43mkill that fellow
?[0m?[32;46;5mgarish!
?[0m?[1;34mThis text is bold blue.
?[0mThis text is normal.
?[33;45mYellow on magenta.
?[0mThis text is normal.
?[33;45mYellow on magenta.
?[0m

Thanks for your help

--
Walter Usyk - Tools Developer
Software Development Environment Tools (1P67)
email: wu...@nortelnetworks.com
ESN: 398-4603
Tel: (613) 768-4603


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
R. A. Larsen  
View profile  
 More options Nov 3 2001, 1:27 pm
Newsgroups: comp.lang.perl.modules, comp.lang.perl.misc, comp.lan.perl.moderated, comp.lang.perl.tk, comp.lang.perl
From: R. A. Larsen <r_lar...@image.dk>
Date: Sat, 03 Nov 2001 19:28:08 +0100
Local: Sat, Nov 3 2001 1:28 pm
Subject: Re: Bold text in UNIX and Windows

It looks to me like you haven't installed the ANSI.SYS device driver. I'm using
Win95 and I have the following line in C:\CONFIG.SYS :

    Device=C:\Windows\Command\Ansi.sys

I don't know if ANSI.SYS exists in Windows NT.

Regards, René
--
Using Virtual Access
http://www.vamail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Clinton A. Pierce  
View profile  
 More options Nov 3 2001, 2:27 pm
Newsgroups: comp.lang.perl.misc, comp.lan.perl.moderated, comp.lang.perl.modules, comp.lang.perl.tk, comp.lang.perl
From: cli...@geeksalad.org (Clinton A. Pierce)
Date: Sat, 03 Nov 2001 19:27:34 GMT
Local: Sat, Nov 3 2001 2:27 pm
Subject: Re: Bold text in UNIX and Windows
[Posted and mailed]

In article <3BE36277.3040...@home.com>,
        Walter Usyk <u...@home.com> writes:

> I was wondering if it is possible to do output the following line of
> text with some bold words inside of the text output. I need to do this
> in UNIX and Windows:

Portably?  hmm.  Best thing to do is assume ANSI for windows (like you're
doing).  For Unix -- because there's lots and lots of terminal types --
you're going to have to interrogate the termcap database (or terminfo)
to find out the control codes to use.  

Then the best thing to do would be to write wrapper functions for
everything, or store the control strings in well-known variables that
you can just print appropriately.  Something like:

        if ($^O =~ /Win/) {
                $inverse=...... # The ANSI module's idea of inverse...
                $normal=...... # The ANSI module's idea of normal...
        } else {
                $inverse=`tput smso`;
                $normal=`tput rmso`;
        }

        print "This is a ${inverse}Hoot!${normal}.";

--
    Clinton A. Pierce            Teach Yourself Perl in 24 Hours  *and*
  cli...@geeksalad.org                Perl Developer's Dictionary
"If you rush a Miracle Man,     for details, see http://geeksalad.org    
        you get rotten Miracles." --Miracle Max, The Princess Bride


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »