The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
GNU screen neked UNIX for Advanced & Expert Users 2 09-26-2008 01:30 AM
Help with screen Gurth UNIX for Dummies Questions & Answers 12 12-22-2006 02:51 AM
Screen on Fedora3 snort Linux 0 02-04-2005 11:48 AM
reading from a screen satyanarayang UNIX for Dummies Questions & Answers 4 04-23-2004 11:47 AM
Printing Problems in unix ... ( Bar-cdoe - Ip Printing) QuickSilver UNIX for Advanced & Expert Users 3 06-04-2002 11:48 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-21-2003
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
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 (permalink)  
Old 10-23-2003
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
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 (permalink)  
Old 10-24-2003
art_malabanan art_malabanan is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 32
Good job google
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:34 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0