LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   coloring the contents of motd file (https://www.linuxquestions.org/questions/linux-software-2/coloring-the-contents-of-motd-file-451292/)

shamanth 06-03-2006 03:21 PM

coloring the contents of motd file
 
I want to color the contents of motd file. that should not change the color of the foreground color of terminals and other files.

bulliver 06-03-2006 05:46 PM

I am not sure of motd but for say, /etc/issue you need to 'echo -ne' the ansi escape code into the file, you cannot simply type or c/p it...

So:
Code:

$ echo -ne "\033[" > motd
$ echo -ne "0;34m" >> motd
$ echo "yadda yadda yadda" >> motd
$ echo -ne "\033[" >> motd
$ echo -ne "0m" >> motd

will display "yadda yadda yadda" in blue, then return colors to normal.

See this for more:
http://www.togaware.com/linux/surviv...in_Screen.html

Again though, that is for issue. I am not sure motd will even interpret the escapes...


All times are GMT -5. The time now is 10:25 PM.