Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question using print or printf?

Status
Not open for further replies.

pmcmicha

Technical User
May 25, 2000
353
I would like to be able to produce text which varies from the standard size using print or printf, but I do not see anything which would allow me to do this..in essence, I would like the size to be as large as the output from banner.

Thanks in advance.
 
I asume you want to send it to a printer.
when you want to change the font or font size
you need to do that with escape sequenceses.

you can find them in your printer manual.

regards
gregor Gregor.Weertman@mailcity.com
 
No, I am not sending this to a printer. Thanks for the tip though if I ever need to do that.

What I want to do is send these messages to a login on what ports they happen to be logged in at using a larger font size than what there terminal emulation defines.

The command banner allows me to do this, but it does work correctly when pushed across the network, i.e. they user has gone to another server, the banner message is just a jumble of characters. But with the print command, it shows up just fine, so if I can find a way to increase the font size like banner, then I can send clear messages.

For a work around, I send the banner to a temp file and then run "sed ${COUNT}q tempfile|tail -1 > message${COUNT}," which will then print correctly by "/usr/bin/cat message*".

I would like to avoid this so that I don't have make a temp file and just use the print function or one of it's variants. From what I have researched, I don't think this can be accomplished via a shell script, I think it has to be done via C using "curses", but since I don't know C all that well, I figured I would ask here first for other alternatives.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top