Highlight text in shell o/p

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Highlight text in shell o/p
# 1  
Old 11-12-2013
Highlight text in shell o/p

Hi All,

Can anyone tell me how to highlight a particular text in shell output or formattting a text in shell ?
# 2  
Old 11-12-2013
Try something like this

$ green='\e[0;32m' 
$ endColor='\e[0m'
$ echo -e "${green}Hi Welcome \e[5;32;47m $USER \n${endColor}"

for more detail visit here
This User Gave Thanks to Akshay Hegde For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting


Hi I have a file as below Merchandise hfdlshaflkdahfdsafhdahfdafhf aldfhdafjadjfsdjfdsjflsjdfjsfjfjs jfahfadhfahdfahfahfahfadhfad Requiremnt: I need to Highlight first line of the file in Bold letters/With Colors and font size change is it possible? (3 Replies)
Discussion started by: buzzme
3 Replies

2. Shell Programming and Scripting

Change text color in Korn shell to highlight Error

Hi this is my first post, so forgive me if what I'm requesting doesn't make sense. I'm connecting into a Unix server via SSH and using a Korn Shell (#!/bin/ksh). The Unix server has Oracle 11g installed on it and there are a number of scripts already setup to query the Oracle database to perform... (2 Replies)
Discussion started by: KeithJ
2 Replies

3. HP-UX

How to highlight syntax in Hp-UX vi editor?

Hi , How do i highlight syntax in vi editor on HP-UX. any suggestion highly appreciated. -Ashok (1 Reply)
Discussion started by: ashokd001
1 Replies

4. UNIX for Dummies Questions & Answers

vim font highlight

Hi, there. I am using vim to edit some files I am working on from terminal. I occasionally pressed some keys by mistake, and the word just got highlight. Afterward whenever I type in that word, it will be highlight automatically. It is annoying. Could someone tell me how to turn this off? BTW,... (6 Replies)
Discussion started by: HOUSCOUS
6 Replies
Login or Register to Ask a Question