Underline

H

Henrik Johansson

Hello,

I want to have underlined output in a shell. How is it done? I've tried
the man pages for print, printf and sprintf, but...

Regards, Henrik
 
A

Anno Siegel

Henrik Johansson said:
Hello,

I want to have underlined output in a shell. How is it done? I've tried
the man pages for print, printf and sprintf, but...

In a shell? Wrong newsgroup.

If you want to do it in Perl, look at ANSIColor (yes, it supports
underline too).

Anno
 
S

Sherm Pendley

Henrik said:
I want to have underlined output in a shell. How is it done?

It depends on the shell you're using. You might want to look at the Curses,
Term::ANSIScreen, and Win32::Console::ANSI modules on CPAN.

sherm--
 
S

Scott W Gifford

Henrik Johansson said:
I want to have underlined output in a shell. How is it done? I've
tried the man pages for print, printf and sprintf, but...

Very old scripts do this by printing a letter, then a backspace, then
an underscore character, like this:

perl -le'print "h\b_i\b_";'

Whether this works will depend on your terminal. For a more portable
solution, see the modules that others have recommended.

----ScottG.
 
H

Henrik Johansson

Very old scripts do this by printing a letter, then a backspace, then
an underscore character, like this:

perl -le'print "h\b_i\b_";'

Whether this works will depend on your terminal. For a more portable
solution, see the modules that others have recommended.

Ok. It didn't really work out on my terminal. I did get underlined blank
spaces, but I couldn't figure out how to get anything else underlined.

I'll try the recommended modules. Thanks people.
 
H

Henrik Johansson

Anno Siegel wrote:

In a shell? Wrong newsgroup.

If you want to do it in Perl, look at ANSIColor (yes, it supports
underline too).

In a shell, using Perl.
 
A

Anno Siegel

Henrik Johansson said:
Anno Siegel wrote:



In a shell, using Perl.

*sigh*

If you use Perl to generate and print text, the properties of your
shell are irrelevant. The properties of your terminal emulation
may matter.

Anno
 
S

Scott W Gifford

Henrik Johansson said:
Ok. It didn't really work out on my terminal. I did get underlined
blank spaces, but I couldn't figure out how to get anything else
underlined.

Those aren't really underlined blank spaces, just the underscore
character. :)
I'll try the recommended modules. Thanks people.

Good luck!

-----ScottG.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top