03-19-2008
ksh - how to echo something in color and bold
Here are the color codes and others:
LF="\n"; CR="\r"
INVT="\033[7m"; NORM="\033[0m"; BOLD="\033[1m"; BLINK="\033[5m"
#UNDR="\033[2m\033[4m"; EOL="\033[0K"; EOD="\033[0J"
UNDR="\033[4m"; EOL="\033[0K"; EOD="\033[0J"
SOD="\033[1;1f"; CUR_UP="\033[1A"; CUR_DN="\033[1B"; CUR_LEFT="\033[1D"
CUR_RIGHT="\033[1C"
#-- ANSI code
SCR_HOME="\033[0;0H" #-- Home of the display
BLACK_F="\033[30m"; BLACK_B="\033[40m"
RED_F="\033[31m"; RED_B="\033[41m"
GREEN_F="\033[32m"; GREEN_B="\033[42m"
YELLOW_F="\033[33m"; YELLOW_B="\033[43m"
BLUE_F="\033[34m"; BLUE_B="\033[44m"
MAGENTA_F="\033[35m"; MAGENTA_B="\033[45m"
CYAN_F="\033[36m"; CYAN_B="\033[46m"
WHITE_F="\033[37m"; WHITE_B="\033[47m"
Example: bold
echo "${BOLD}Bold test ${NORM}"
-Ramesh
7 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi friend ,
I am generating a csv file i,e output file
E104|0|06/04/1994|The values E005 and E001 are not equal.
E106|0|01/09/1993|The values E001 and E002 are not equal.
E106|0|01/09/1993|The values E003 and E002 are not equal.
E108|0|02/30/1995|The values R001 and E001 are not equal.... (0 Replies)
Discussion started by: charandevu
0 Replies
2. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to bold, blink, italicise words using echo command. As per the research I did, it says to use the following escape code to get the effects.
#!/bin/bash
clear
echo -e "\033
However when I am compiling I am not getting the desired effect.
Can anyone... (7 Replies)
Discussion started by: grc
7 Replies
3. Shell Programming and Scripting
Hi
Supposed this text output:
How can I show $HOSTNAME in other color than blank? :-)
KSH on AIX (4 Replies)
Discussion started by: iga3725
4 Replies
4. Shell Programming and Scripting
Hi,
When I run:
echo "\033I see hi in color, but if I run this color is not shown, why?
(echo "\033Thanks
Israel.
---------- Post updated at 05:17 AM ---------- Previous update was at 04:43 AM ----------
DONE!!
I had to run more -v.
Thanks (4 Replies)
Discussion started by: iga3725
4 Replies
5. Shell Programming and Scripting
Hi All,
This is my first port.....
I am using AIX 5L, installed 10g database.
On daily basis we takes rman backup.
This backup status info strored in a log file.
I write a script to know the status of back means I will fire this script and this script will send a mail to me.
#!/bin/bash... (16 Replies)
Discussion started by: mcagaurav
16 Replies
6. UNIX for Dummies Questions & Answers
Is it possible to change the color when doing an echo?
Example, having the following command print in dark blue.
echo "Hello"
---------- Post updated at 11:50 AM ---------- Previous update was at 10:25 AM ----------
Just figured out how to do it (2 Replies)
Discussion started by: kristinu
2 Replies
7. UNIX for Beginners Questions & Answers
I have a bash script that starts and stops a game among other things through in.fifo and out.fifo
In game the text comes out gray . Kinda hard to see in game window .
I would like to change it to purple and maybe capitalize it.
#!/bin/bash
#nwservctl.sh
cd... (5 Replies)
Discussion started by: 222222quick
5 Replies
LEARN ABOUT DEBIAN
clanht.f
clanht.f(3) LAPACK clanht.f(3)
NAME
clanht.f -
SYNOPSIS
Functions/Subroutines
REAL function clanht (NORM, N, D, E)
CLANHT
Function/Subroutine Documentation
REAL function clanht (characterNORM, integerN, real, dimension( * )D, complex, dimension( * )E)
CLANHT
Purpose:
CLANHT returns the value of the one norm, or the Frobenius norm, or
the infinity norm, or the element of largest absolute value of a
complex Hermitian tridiagonal matrix A.
Returns:
CLANHT
CLANHT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
(
( norm1(A), NORM = '1', 'O' or 'o'
(
( normI(A), NORM = 'I' or 'i'
(
( normF(A), NORM = 'F', 'f', 'E' or 'e'
where norm1 denotes the one norm of a matrix (maximum column sum),
normI denotes the infinity norm of a matrix (maximum row sum) and
normF denotes the Frobenius norm of a matrix (square root of sum of
squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
Parameters:
NORM
NORM is CHARACTER*1
Specifies the value to be returned in CLANHT as described
above.
N
N is INTEGER
The order of the matrix A. N >= 0. When N = 0, CLANHT is
set to zero.
D
D is REAL array, dimension (N)
The diagonal elements of A.
E
E is COMPLEX array, dimension (N-1)
The (n-1) sub-diagonal or super-diagonal elements of A.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Definition at line 102 of file clanht.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.1 Sun May 26 2013 clanht.f(3)