I edited [the default
/etc/update-motd.d/00-header
](https://gist.github.com/IQAndreas/e3e7d58d81328779f630) , adding some color to make it easier to read:
printf "Welcome to \e[1;34m%s\e[0m \e[2m(%s %s %s)\e[0m\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"
I can run that line of code just fine in a terminal, but when I edit 00-header
with this information, I get the escape codes printed out in plaintext:
Welcome to \e[1;36mUbuntu 13.10\e[0m \e[2m(GNU/Linux 3.11.0-23-generic i686)\e[0m
How can I add a splash of color to the message of the day?
Asked by IQAndreas
(10635 rep)
Jun 25, 2014, 03:06 AM
Last activity: Jun 23, 2024, 08:37 PM
Last activity: Jun 23, 2024, 08:37 PM