title: Cannot redirect the ouput of hwclock -r command
body: <p>I am implementing a shell script and I want to analyse the output shown by hwclock -r (--show) command which displays the RTC time and date.</p>
  
  <p>To do that I tried things like: hwclock -r | grep -v "grep" | grep "error" > /dev/null
  to see if an error happened while reading RTC registers.</p>
  
  <p>The problem is that output is only and always forwarded to console. I tried to forward output to a file then analyse its content and I also tried to use tee -a command to direct output to both console and a file, but with no success.</p>
  
  <p>Is there a solution to that or an explanation to what is happening with hwclock -r command.</p>
  
  <p>In advance Thank you.</p>