printing to the screen


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users printing to the screen
# 1  
Old 10-21-2003
Usng tput cup to print to screen

HPUX 11.0.X / Korn Shell
Hope this makes sense.

I have a little function to place things on the screen using the column and row parameters. Question is, how can I be sure of where the current cursor postion is so that if I print something to the upper right hand corner of the screen, I can again return back to the row (really the next row) where the cursor was originally?

Example: Assume that my current cursor position is at row 52. I call my function to print a message starting at row 20, column 35. How can I return focus back to row 52 (or 53) after I have printed to the screen? Is there a way to grab my current row/column attributes?


xy () {
#_R= row, _C=column
_R=$1
_C=$2
tput cup $_R $_C
}

Last edited by google; 10-21-2003 at 10:14 PM..
# 2  
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
# 3  
Old 10-24-2003
Good job google Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question