Colors in Ksh Script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Colors in Ksh Script
# 1  
Old 08-20-2007
Colors in Ksh Script

Hi All,

is it poosible to Print the error messages in colors.., i am using KSH...,

i have tried the following,

echo "\033[34m Hi This is Sam!!! \033[0m"
Hi This is Sam!!!

But, when i tried to redirect in to a log file, i am getting as follows,

echo "\033[34m Hi This is Sam!!! \033[0m" > sam.log
view sam.log
sam.log" [Read only] 1 line, 31 characters
^[[34m Hi This is Sikki!!! ^[[0m

The colors are not coming..

Could any one help me in this? Do i need to set up any env variables..,

Thanks
Sam
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script: problem with a function which use colors

Hello guys :) I've a some issue with a function which use the bash colors in my script. An example : #!/bin/bash set -x log_in(){ host="srv1" remote_files="log/" LOG_FILE="logfile" green='\033]; then color_in_red=("${red}"$2"${none}") echo -e... (2 Replies)
Discussion started by: Arnaudh78
2 Replies

2. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

3. Shell Programming and Scripting

KSH printf: columns and colors

Ih all, I need to make a ksh script with colors, it is possible with printf to combine column and colors ? i seem not working, I think i dont doing the good thing: printf -n "%-15s %-20s %-20s\n" "\033 the position is ok Name______Age________Site ----________---_________---- Bob... (2 Replies)
Discussion started by: wolfhurt
2 Replies

4. Shell Programming and Scripting

import var and function from ksh script to another ksh script

Ih all, i have multiples ksh scripts for crontab's unix jobs they all have same variables declarations and some similar functions i would have a only single script file to declare my variables, like: var1= "aaa" var2= "bbb" var3= "ccc" ... function ab { ...} function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies

5. Shell Programming and Scripting

colors in BASH, doubt with script

I was trying to see all combinations of foreground and background colors in BASH. This works fine for me, echo -e '\E[37;46m TEXT' but when I tried the below script, the variables i and j do not expand. #!/bin/sh for i in `seq 30 37` # foreground do for j in `seq 40... (4 Replies)
Discussion started by: jaduks
4 Replies

6. Shell Programming and Scripting

tracing a ksh script within a ksh script

I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below...... vi hairy bear=`grep bear animals` if then ksh more_animals fi If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies

7. Shell Programming and Scripting

executing a ksh script from another ksh script

Hi, I'm new to unix scripting.How can i call a script from another script. I have a.ksh and b.ksh .I have to call b.ksh from a.ksh after it is successfully exceuted. I tried using #!/bin/ksh -x in a.ksh and at the end i have used /path/b.ksh My problem is it is executing only a.ksh.it... (6 Replies)
Discussion started by: ammu
6 Replies

8. UNIX Desktop Questions & Answers

colors

Hello, I am somewhat new to linux. I just installed Red Hat 7.2 and when I try to load gnome or KDE in colors above 8bit it will kind of lock up and display some wierd scrambled cable look. I have an ATI Radeon 7000. I check out my monitor settings they are fine. Is it the graphics card? I set my... (1 Reply)
Discussion started by: Sage3k
1 Replies

9. Shell Programming and Scripting

colors in ksh script

hello! I'd like to print on screen amessage. What can I do to print this message with blue fonts. thanks... (4 Replies)
Discussion started by: hoang
4 Replies

10. UNIX for Dummies Questions & Answers

Changing korn shell script text Menu colors?

Is it possible to change the color of text in a korn shell script Menu? I can change the color of session text through my telnet client but I want to be able to change color text in the Korn shell menu to highlight certain items. (6 Replies)
Discussion started by: darthur
6 Replies
Login or Register to Ask a Question
rgb2gif(1)						      General Commands Manual							rgb2gif(1)

NAME
rgb2gif - A program to convert 24 bit images to a GIF image using color quantization. USAGE
rgb2gif [-q] [-c #Colors] [-1] -s Width Height [-h] RGBFile If no RGBFile is given, RGB2Gif will try to read a GIF file from stdin. MEMORY REQUIRED
Screen. OPTIONS
[-q] Quiet mode. Defaulte off on MSDOS, on under UNIX. Controls printout of running scan lines. Use -q- to invert. [-c #Colors] Specifies number of colors to use, in bits per pixels, so `-c 8' specifies actually 256 colors (maximum and default). [-1] Only one file in the format of RGBRGB... triplets (Each of R, G, B is a byte) is read from input. This file size is 3 * Width * Height (see `-s' below. If stdin is used for input, this option is implicitly applied. The default (if not '-1') is 3 files with the names RGBFile.R, RGBFile.G, RGBFile.B, each of which is Width * Height bytes. [-s Width Height] Specifies the size of the image to read. [-h] Print one line of command line help, similar to Usage above. AUTHOR
Gershon Elber Man page created by T.Gridel <tgridel@free.fr>, originally written by Eric S. Raymond <esr@thyrsus.com> giflib-tools rgb2gif(1)