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 Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Reverse FTP ganesh123 Shell Programming and Scripting 4 02-22-2007 02:20 PM
Reverse Proxy dipanrc Linux 0 12-27-2005 10:05 AM
string in reverse malaymaru Shell Programming and Scripting 4 10-18-2005 11:32 AM
Reverse * azmathshaikh Shell Programming and Scripting 2 04-26-2005 07:40 AM
Reverse lookup jpalmer320 IP Networking 1 05-21-2004 09:36 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 02-11-2002
marcose marcose is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 2
Reverse Display

I need to display a line in an xterm window but i want to revese the colors so that the background color becomes the foreground color and the foreground color the background color. I want to do this as part of ksh script.

Can somebody tell me how to do this ?

Thanks,
Abu.
  #2 (permalink)  
Old 02-11-2002
Perderabo's Avatar
Perderabo Perderabo is online now Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,118
Try:
echo $(tput rev) text goes here $(tput rmso)
  #3 (permalink)  
Old 02-12-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Is there any difference between "tput rev" and "tput smso"?
  #4 (permalink)  
Old 02-12-2002
Perderabo's Avatar
Perderabo Perderabo is online now Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,118
Quote:
Originally posted by LivinFree
Is there any difference between "tput rev" and "tput smso"?
That depends on the capabilities of the terminal and the author of the terminal's terminfo entry.

"rev" is clearly reverse video.

As for smso, the terminfo man page states:
Quote:
Choose one display method as standout mode and use it to highlight error messages and other text to which you want to draw attention. Choose a for of display that provides strong contrast but that is easy on the eyes. (We recommend reverse-video plus half-bright or reverse-video alone.
Hmmm...as I look at the man page though, I see that I shouldn't have used "rmso"...
Quote:
sgr0 should be used to turn off all video enhancement capabilities. It should always be specified because it represents the only way to turn off some capabilities, such as dim or blink.
So this is a better answer:

echo $(tput rev) text goes here $(tput sgr0)
  #5 (permalink)  
Old 02-12-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Aha... I didn't realize that there was a more correct way that "rmso"... Thank you for clearing that up for me.
  #6 (permalink)  
Old 02-12-2002
marcose marcose is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 2
Muchos Gracias.. LivinFree and Perdarbo
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 09:25 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