Hi,
I am trying to write a script which will email a backup report from the server,
The contents of the email will be:
I was wondering if there is a way using sed or similar to change the colour of the word Passed to green, and if the backup fails the word failed to red,
eg
You can do that, but the colour change depends on which terminal you use to display the email. Look up "termcap" or "terminfo" ("terminfo" is the more modern one, depending on your system it is preferable) in the man pages and then find out which terminal (emulator) you are using, then use "sed" to insert the respective sequence:
The sequence you have to fill in depends on the terminal you are using. All the capabilities of all terminals known to the system are in the termcap/terminfo database. Read the manpage of terminfo/termcap about how to retrieve the information necessary, then use this procedure to get the correct (escape-)sequences, then fill these in into the variable definitions. Then, the procedure described above will work.
I cannot tell you more details, because i do not know which terminal you are using and every terminal has its own sequences. You will have to find out your terminal by issuing
and searching for whatever the system displays as answer in the terminfo or termcap database.
The plethora of terminal types has, for all intents and purposes, been reduced to a single, standard type. This standard, ISO 6429 (also known as ECMA-48, and formerly known as ANSI X3.64 or VT100), is ubiquitous, and terminals that do not support it are few and far between.
Hello,
I have a problem with my putty session when i use the vi editor or when i do dbaccess on an Informix database.
Suddenly the background and foreground colour of my terminal change and it makes it difficult for me to see whats on the screen.
Why this is happening? Is there a way to keep... (2 Replies)
i want to ask how to change the colour of prompt message from use?
and also how to change colour in printing........
i want to change it as blue colour and red colour, but i found many website still don't know how to do. how's the command is wrote?
thz really!! (1 Reply)
Hi
I want to change the color of the email content sent through unix. I tried a lot and left in vain. I heard that it could be done by sending the email as HTML. But I don't how to do it. Can you all share your ideas?
~sakthifire (1 Reply)
hi all,
how do i change the colour of text if i am using printf ?? in my script i am printing out response times from the server and i wanted to print out the max response time in red.
ta. (1 Reply)
Dear All,
We have following code to send mails from unix to users. We want to see few sentences of mail in bold font or to hightlight few lines in different colours. Could you please let me know how can we do it in function construct_body.
... (3 Replies)
Good day all
I am looking for a way to change colours in a text file that get tailed.
I have tried using tput, however this does not seem to work. terminal type is using putty and vt100 emulation.
Any ideas. :rolleyes:
Thanks
J (6 Replies)
Hi all,
I have written one script. If i run the script, particular text in that script needs to be displayed in color.how this could be done?any commands r there to change the colour of the text while running the script?
Ur help is appreciated !!!
Thanx in Advance,
Sona. (7 Replies)