Is it possible to define a function in the MOTD on a Ubuntu box?
I have the following in my motd.tail file:
#!/bin/sh
? () { echo "$*" | bc -l; }
echo
date
echo
However the function definition doesn’t work if I login to the box, i.e.:
? 10*2
?: command not found
Any ideas on how I can define the function?
Thanks
Most distros have a system-wide bashrc file that is suited for things like this.
On Debian, this file is: /etc/bash.bashrc