Sponsored Content
Full Discussion: printing to the screen
Top Forums UNIX for Advanced & Expert Users printing to the screen Post 42183 by google on Thursday 23rd of October 2003 11:53:45 AM
Old 10-23-2003
I figured my problem out. You can save the current position of the cursor using the command tput sc and then restore the cursor back to the save point by using the command tput rc
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies

2. Shell Programming and Scripting

Appending to a file without printing to screen

#!/bin/csh awk 'BEGIN { print "Name Exam1 Exam2 Exam 3 Total Grade" }' grades | tee gradesorted awk '{if ($2+$3+$4<50){grade="F"}else if ($2+$3+$4>49 && $2+$3+$4<65) {grade="D"}else if ($2+$3+$4>64 && $2+$3+$4<80){grade="C"} else if ($2+$3+$4>79... (5 Replies)
Discussion started by: lazypeterson
5 Replies

3. OS X (Apple)

Virtual screen accessed by Screen Sharing

Hi, I'm trying to create a virtual screen, (maybe xvfb? or any other virtual screen buffer) and be able to use Screen Sharing to connect to it. The setup is that I have a Mac Mini connected to the TV. But when my girlfriend is using Front Row, I can't use Screen Sharing at the same time from... (0 Replies)
Discussion started by: linge
0 Replies

4. Shell Programming and Scripting

PERL - printing a hash of hashes to screen

Hi there I have a hash of hashes made up of the following data bge0|100|half|10.36.100.21 bge1|1000|full|10.36.100.22 bge2|1000|full|10.36.100.23 which when i turn into a hash, would look like this inside the system bge0 -> nic_speed -> 100 nic_duplex -> half ... (6 Replies)
Discussion started by: hcclnoodles
6 Replies

5. Shell Programming and Scripting

printing messages on the screen when background process is going on!

hello all, In my script i have written some messages which should come in screen while some background process is going on.. Like for example: if i want to add 2 numbers a and b ...when the addition is going on in the background i should get "ADDING TWO NUMBERS>>PLEASE WAIT " message on... (3 Replies)
Discussion started by: smarty86
3 Replies

6. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

7. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

8. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

9. UNIX for Dummies Questions & Answers

Accidentally made a screen within a screen - how to move it up one level?

I made a screen within a screen. Is there a way to move the inner screen up one level so that it is at the same level as the first screen running from the shell? (2 Replies)
Discussion started by: phpchick
2 Replies

10. UNIX for Beginners Questions & Answers

Printing, SYSPRINTER, IP printing

Dear readers, We have a printer problem with a UNIX system. The OS is Unix IRIX 6.5 We have connected a printerto the system. If we then make a test print everything goes well . (IP printing) But if we make a print from the "orrga,i"program. Then we see all the printouts stuck within the... (3 Replies)
Discussion started by: SergevdH
3 Replies
tput(1) 							   User Commands							   tput(1)

NAME
tput - initialize a terminal or query terminfo database SYNOPSIS
tput [-T type] capname [parm...] tput -S << DESCRIPTION
The tput utility uses the terminfo database to make the values of terminal-dependent capabilities and information available to the shell (see sh(1)); to clear, initialize or reset the terminal; or to return the long name of the requested terminal type. tput outputs a string if the capability attribute (capname) is of type string, or an integer if the attribute is of type integer. If the attribute is of type boolean, tput simply sets the exit status (0 for TRUE if the terminal has the capability, 1 for FALSE if it does not), and produces no out- put. Before using a value returned on standard output, the user should test the exit status ($?, see sh(1)) to be sure it is 0. See the EXIT STATUS section. OPTIONS
The following options are supported: -Ttype Indicates the type of terminal. Normally this option is unnecessary, because the default is taken from the environment variable TERM. If -T is specified, then the shell variables LINES and COLUMNS and the layer size will not be referenced. -S Allows more than one capability per invocation of tput. The capabilities must be passed to tput from the standard input instead of from the command line (see the example in the EXAMPLES section). Only one capname is allowed per line. The -S option changes the meaning of the 0 and 1 boolean and string exit statuses (see the EXAMPLES section). OPERANDS
The following operands are supported: capname Indicates the capability attribute from the terminfo database. See terminfo(4) for a complete list of capabilities and the capname associated with each. The following strings will be supported as operands by the implementation in the "C" locale: clear Display the clear-screen sequence. init If the terminfo database is present and an entry for the user's terminal exists (see -Ttype, above), the following will occur: 1. if present, the terminal's initialization strings will be output (is1, is2, is3, if, iprog), 2. any delays (for instance, newline) specified in the entry will be set in the tty driver, 3. tabs expansion will be turned on or off according to the specification in the entry, and 4. if tabs are not expanded, standard tabs will be set (every 8 spaces). If an entry does not contain the information needed for any of the four above activities, that activity will silently be skipped. reset Instead of putting out initialization strings, the terminal's reset strings will be output if present (rs1, rs2, rs3, rf). If the reset strings are not present, but initialization strings are, the initialization strings will be output. Otherwise, reset acts identically to init. longname If the terminfo database is present and an entry for the user's terminal exists (see -Ttype above), then the long name of the terminal will be put out. The long name is the last name in the first line of the ter- minal's description in the terminfo database (see term(5)). parm If the attribute is a string that takes parameters, the argument parm will be instantiated into the string. An all numeric argument will be passed to the attribute as a number. EXAMPLES
Example 1: Initializing the terminal according to TERM This example initializes the terminal according to the type of terminal in the environment variable TERM. This command should be included in everyone's .profile after the environment variable TERM has been exported, as illustrated on the profile(4) manual page. example% tput init Example 2: Resetting a terminal This example resets an AT&T 5620 terminal, overriding the type of terminal in the environment variable TERM: example% tput -T5620 reset Example 3: Moving the cursor The following example sends the sequence to move the cursor to row 0, column 0 (the upper left corner of the screen, usually known as the "home" cursor position). example% tput cup 0 0 This next example sends the sequence to move the cursor to row 23, column 4. example% tput cup 23 4 Example 4: Echoing the clear-screen sequence This example echos the clear-screen sequence for the current terminal. example% tput clear Example 5: Printing the number of columns This command prints the number of columns for the current terminal. example% tput cols The following command prints the number of columns for the 450 terminal. example% tput -T450 cols Example 6: Setting shell variables This example sets the shell variables bold, to begin stand-out mode sequence, and offbold, to end standout mode sequence, for the current terminal. This might be followed by a prompt: echo "${bold}Please type in your name: ${offbold}c" example% bold='tput smso' example% offbold='tput rmso' Example 7: Setting the exit status This example sets the exit status to indicate if the current terminal is a hardcopy terminal. example% tput hc Example 8: Printing the long name from terminfo This command prints the long name from the terminfo database for the type of terminal specified in the environment variable TERM. example% tput longname Example 9: Processing several capabilities with one invocation This example shows tput processing several capabilities in one invocation. This example clears the screen, moves the cursor to position 10, 10 and turns on bold (extra bright) mode. The list is terminated by an exclamation mark (!) on a line by itself. example% tput -S <<! > clear > cup 10 10 > bold > ! ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of tput: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. TERM Determine the terminal type. If this variable is unset or null, and if the -T option is not specified, an unspecified default ter- minal type will be used. EXIT STATUS
The following exit values are returned: 0 o If capname is of type boolean and -S is not specified, indicates TRUE. o If capname is of type string and -S is not specified, indicates capname is defined for this terminal type. o If capname is of type boolean or string and -S is specified, indicates that all lines were successful. o capname is of type integer. o The requested string was written successfully. 1 o If capname is of type boolean and -S is not specified, indicates FALSE. o If capname is of type string and -S is not specified, indicates that capname is not defined for this terminal type. 2 Usage error. 3 No information is available about the specified terminal type. 4 The specified operand is invalid. >4 An error occurred. -1 capname is a numeric variable that is not specified in the terminfo database. For instance, tput -T450 lines and tput -T2621 xmc. FILES
/usr/include/curses.h curses(3CURSES) header /usr/include/term.h terminfo header /usr/lib/tabset/* Tab settings for some terminals, in a format appropriate to be output to the terminal (escape sequences that set margins and tabs). For more information, see the "Tabs and Initialization" section of terminfo(4) /usr/share/lib/terminfo/?/* compiled terminal description database ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
clear(1), sh(1), stty(1), tabs(1), curses(3CURSES), profile(4), terminfo(4), attributes(5), environ(5), standards(5), term(5) SunOS 5.10 1 Feb 1995 tput(1)
All times are GMT -4. The time now is 04:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy