Sponsored Content
Full Discussion: Highlight text in shell o/p
Top Forums UNIX for Dummies Questions & Answers Highlight text in shell o/p Post 302873559 by Akshay Hegde on Tuesday 12th of November 2013 11:12:17 AM
Old 11-12-2013
Try something like this

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

for more detail visit here
http://misc.flogisoft.com/bash/tip_c...and_formatting
This User Gave Thanks to Akshay Hegde For This Post:
 

4 More Discussions You Might Find Interesting

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

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

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

4. Shell Programming and Scripting

HOW TO HIGHLIGHT FIRST LINE IN FILE?

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
KinoSearch1::Highlight::SimpleHTMLFormatter(3pm)	User Contributed Perl Documentation	  KinoSearch1::Highlight::SimpleHTMLFormatter(3pm)

NAME
KinoSearch1::Highlight::SimpleHTMLFormatter - surround highlight bits with tags SYNOPSIS
my $formatter = KinoSearch1::Highlight::SimpleHTMLFormatter->new( pre_tag => '<i>', post_tag => '</i>', ); # returns "<i>foo</i>" my $highlighted = $formatter->highlight("foo"); DESCRIPTION
This subclass of KinoSearch1::Highlight::Formatter highlights text by surrounding it with HTML "strong" tags. METHODS
new Constructor. Takes hash-style params. my $formatter = KinoSearch1::Highlight::SimpleHTMLFormatter->new( pre_tag => '*', # default: '<strong>' post_tag => '*', # default: '</strong>' ); o pre_tag - a string which will be inserted immediately prior to the highlightable text, typically to accentuate it. If you don't want highlighting, set both "pre_tag" and "post_tag" to ''. o post_tag - a string which will be inserted immediately after the highlightable text. COPYRIGHT
Copyright 2006-2010 Marvin Humphrey LICENSE, DISCLAIMER, BUGS, etc. See KinoSearch1 version 1.00. perl v5.14.2 2011-11-15 KinoSearch1::Highlight::SimpleHTMLFormatter(3pm)
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy