Handle color code


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Handle color code
# 1  
Old 05-28-2013
Handle color code

p1=text1
p2=text2(in red color)

when i am trying to replace $p1 with $p2, content of the file from text2 become red. so when i open that file using vi its showing color code before tex2.
please suggest me how to omit that color code and make content of that file in default color?
# 2  
Old 05-28-2013
Hi Biplab...

Code:
http://en.wikipedia.org/wiki/ANSI_escape_code

This is for *NIX flavours and you can do loads more than just colours...

If you are using Windows then on CMD.EXE use the builtin COLOR command which will ONLY change foreground and background colours as a whole.

If you use Windows PowerShell then good luck as it is a RPITA...
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use one loop to handle below code

mknod /dev/vda b 253 0 mknod /dev/vda1 b 253 1 mknod /dev/vda2 b 253 2 mknod /dev/vda3 b 253 3 I know below code is ease to handle, but I don't know above code mknod /dev/vda1 b 253 1 mknod /dev/vda2 b 253 2 mknod /dev/vda3 b 253 3 (3 Replies)
Discussion started by: yanglei_fage
3 Replies

2. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies

3. UNIX for Dummies Questions & Answers

Color code my vi

i am running under ssh i want to know how to make vi color code my bash scripting like how do i setup vim in ssh (1 Reply)
Discussion started by: jafa401
1 Replies
Login or Register to Ask a Question