3

Is it possible to send messages to other users (i.e. via the wall and/or write commands), with colors in the message? I have a shutdown script that kicks other users off of a shared file server, and I want to make the message more obvious to them by either making it red, or piping it through lolcat and cowsay.

I've attempted to paste Bash color codes (i.e. RED='^[[31m'), but they get converted to plain printing characters.

Cloud
  • 405
  • 3
  • 12

1 Answers1

3

Downtime notification isn't entirely a technical problem. If there is a policy of user notification of downtime on this box, do so via agreed-upon channels.


Regarding control characters, not with wall or write. util-linux README indicates this is intentional.

Version 1.32b (12-Mar-95):
        Write/wall now strips control chars except BEL (\007). Again after
        suggestion by Rik Faith.

Multiple line wall usually work, specifically if you use a file argument.

figlet is another option for your ASCII art.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32