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 > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
RHEL5 Kickstart Problem... HELP! mkono Linux 3 05-08-2009 12:39 PM
FTP from PC to VM running RHEL5 / RHEL4 CuriousKitty UNIX for Dummies Questions & Answers 4 06-05-2008 01:46 AM
OpenVZ kernel 2.6.18-53.1.13.el5-028stab053.10 (RHEL5 2.6.18 branch) iBot Software Releases - RSS News 0 04-11-2008 01:20 PM
OpenVZ kernel 2.6.18-53.1.4.el5-028stab053.4 (RHEL5 2.6.18 branch) iBot Software Releases - RSS News 0 01-18-2008 08:20 PM
tracking sequence num frustrated1 Shell Programming and Scripting 1 02-21-2006 04:34 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-28-2008
amit1_x amit1_x is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 23
ESC sequence on RHEL5

We have migrated one of servers from RH 2.1 to RHEL5 , some of the scripts on our machine use escape sequence to print output . Om RH 2.1 we were using echo
Code:
echo "\033[01;31m ERROR  \033[m" 
ERROR
, which would give output ERROr in red . However the script does not work properly with RH5 and gives
Code:
\033[01;31m error \033[m
as output . I am not sure what escape sequence should i use
  #2 (permalink)  
Old 04-28-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
See man tput for how to output terminal control codes in a slightly more abstract manner. (The manual is obtuse, as such; you might want to search the web for a tutorial; but it helps to read the manual page to see what terminology to search for.)
  #3 (permalink)  
Old 04-28-2008
amit1_x amit1_x is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 23
I figured it out
Code:
echo   -e "\033[01;31m ERROR  \033[m"
ERROR
tahnsk for the hint though!
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:26 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