Text color in Linux scripts via putty

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Text color in Linux scripts via putty
# 1  
Old 01-24-2017
Text color in Linux scripts via putty

hi Folks,

Can anyone help with changing the color of the words in a linux shell script?

I get how to change default background etc in putty, but for some reason the text in the script has different colors for different parts of the cript.

Is there a way to have one color in a linux shell script?

I attach an example of the color issue in a linux script.

Thanks for any help.

jd
Text color in Linux scripts via putty-script_outputpng
# 2  
Old 01-24-2017
looks like you you're using vim for editing (probably aliased to vi).
Try vi -u NONE myFile
# 3  
Old 01-24-2017
That looks more like a "feature" of your editor marking / highlighting different key words / types with different colours. Should be switchable. Check your editor's man page.
# 4  
Old 01-24-2017
In my profile, I always include:-
Code:
unalias grep  2>/dev/null
unalias ls    2>/dev/null
unalias vi    2>/dev/null

This generally removes the silly colouring of output, such as "dark blue on black" or "yellow on white"


Maybe I'm too old and fondly remember IBM mainframe 3270 displays ...... Smilie

Robin
# 5  
Old 01-24-2017
Quote:
Originally Posted by rbatte1
Maybe I'm too old and fondly remember IBM mainframe 3270 displays ...... Smilie

Robin
If you mean the green display, I didn't have an IBM 3270 but I do fondly remember an IBM PC with hercules card, that super-luminous green may be out-of-gamut on modern displays, I could never quite duplicate it.
# 6  
Old 01-24-2017
I guess you are using vim and syntax highlighting is turned on, to turn it back off, in command mode type:-
Code:
:syntax off

This User Gave Thanks to Yoda For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Ubuntu

Using color in scripts

This is supposed to colorize. But it outputs this 3 GREEN='3; then echo -e "${GREEN}File exists.${RESET}" else echo -e "${RED}File does NOT exist.${RESET}" fi (18 Replies)
Discussion started by: drew77
18 Replies

2. Shell Programming and Scripting

regarding Color scheme in linux console connected through putty.

Hi All, I am connecting to SunOs 5.8 server from windows machine through putty. My problem is commands are not showing any colours results. I want to see 'ls' command should list directories in 'red' and files in 'green' etc. How to do it . Please help. Also How to enable syntax colouring in... (6 Replies)
Discussion started by: Sooraj_Linux
6 Replies

3. AIX

How to color text and mail

I want to color the text and bold the text and mail these text. input: hi..(in bold) good morning (in blue color) and mail these as in color and bold :wall: (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies

4. Programming

changing text color in c

I'm writing my own Unix ls command in c and I was wondering if anyone knows how to or can point me to a tutorial that shows me how to change the text color of the filename depending on if it's a directory, regular file, linked file, etc..., like the real ls command does? Thanks. (4 Replies)
Discussion started by: snag49ers
4 Replies

5. Red Hat

New Background and Text Color

Hi. How do I change the background color and text in Fedora. I did find the set_color -b command. Thanks (1 Reply)
Discussion started by: Ccccc
1 Replies

6. AIX

Enabling color for putty session

Hi Everyone: Is there any way to enable colors through putty for a session into AIX? I've tried to set the TERM variable to xterm-256color but it doesn't work having a 8-color terminal would be okay for me thanks in advance (5 Replies)
Discussion started by: edgarvm
5 Replies

7. Shell Programming and Scripting

text color

Hi all I have a file contains columns showing figures as below : Input file A B C D 50 60 90 E 100 20 53 F 30 40 70 G 25 27 45 I want to color the value above or equal 90 by red and to be shown as below output file... (5 Replies)
Discussion started by: Bluetoot
5 Replies

8. Shell Programming and Scripting

Color putty

Right now I am using putty. I am using 2-3 terminals at a time. To differentiate each termianl I want to put each putty screen and background color to different colors. I tried changing the colors in normal putty but it's not working. Is there any other color putty ? Regards, Venkat (2 Replies)
Discussion started by: svenkatareddy
2 Replies
Login or Register to Ask a Question