title: MOTD script doesn't show colors
body: <p>I am using a Raspberry Pi with a Debian based distro (I think it's called Raspbian). I put a file called <code>10-pi</code> into the <code>/etc/update-motd.d</code> directory and made it executable. When I run the executable (bash) myself it shows me a nice MOTD with colors. When I login with ssh to my Pi however, I see the right MOTD but it shows everything in white. Anybody knows why this might be?</p>
  <p>Here is my <code>10-pi</code> file:</p>
  <pre><code>#!/bin/bash
  
  let upSeconds=&quot;$(/usr/bin/cut -d. -f1 /proc/uptime)&quot;
  let secs=$((${upSeconds}%60))
  let mins=$((${upSeconds}/60%60))
  let hours=$((${upSeconds}/3600%24))
  let days=$((${upSeconds}/86400))
  UPTIME=`printf &quot;%d days, %02dh%02dm%02ds&quot; &quot;$days&quot; &quot;$hours&quot; &quot;$mins&quot; &quot;$secs&quot;`
  
  # get the load averages
  read one five fifteen rest &lt; /proc/loadavg
  
  echo &quot;$(tput setaf 2)
     .~~.   .~~.    `date +&quot;%A, %e %B %Y, %r&quot;`
    '. \ ' ' / .'   `uname -srmo`$(tput setaf 1)
     .~ .~~~..~.
    : .~.'~'.~. :   Uptime.............: ${UPTIME}
   ~ (   ) (   ) ~  Memory.............: `cat /proc/meminfo | grep MemFree | awk {'print $2'}`kB (Free) / `cat /proc/meminfo | grep MemTotal | awk {'print $2'}`kB (Total)
  ( : '~'.~.'~' : ) Load Averages......: ${one}, ${five}, ${fifteen} (1, 5, 15 min)
   ~ .~ (   ) ~. ~  Running Processes..: `ps ax | wc -l | tr -d &quot; &quot;`
    (  : '~' :  )   IP Addresses.......: `/sbin/ifconfig eth0 | /bin/grep &quot;inet addr&quot; | /usr/bin/cut -d &quot;:&quot; -f 2 | /usr/bin/cut -d &quot; &quot; -f 1` and `wget -q -O - http://icanhazip.com/ | tail`
     '~ .~~~. ~'    Weather............: `curl -s &quot;http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&amp;locCode=EUR|UK|UK001|NAILSEA|&quot; | sed -n '/Currently:/ s/.*: \(.*\): \([0-9]*\)\([CF]\).*/\2\3, \1/p'`
         '~'
  $(tput sgr0)&quot;
  </code></pre>
  <p>This is what it looks like when I execute the file myself:
  <a href="https://i.stack.imgur.com/vcPRq.png" rel="nofollow noreferrer">Output when executed manually</a></p>