title: List all cronjobs if there are any without superfluous info
body: <p>Trying to output a list of cronjobs, not a list of users. The raw output of <code>crontab -l</code> is way too dirty and I can't seem to clean it up. I run this with <code>sudo script.sh</code> or <code>su</code> and then run it. I've tried invoking it <code>sudo script.sh | grep -v no</code> also. I'm mystified why this doesn't work:</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash
  #Trying to show all cronjobs but no extraneous info
  #
  # This shows "no crontab for USER" for every USER without
  # a crontab - I only want to see actual cronjobs, not a long
  # list of users without crontabs
  echo "Here is the basic output that needs manipulation:
  "
  for USER in `cat /etc/passwd | cut -d":" -f1`; do
      crontab -l -u $USER
  done
  #
  # grep -v fails me
  # (grep'ing the output of the script as a whole fails also)
  echo "
  trying with grep -v no on each line:
  "
  for USER in `cat /etc/passwd | cut -d":" -f1`; do
      crontab -l -u $USER | grep -v no
  done
  
  echo "
  maybe with quotes around the no:
  "
  for USER in `cat /etc/passwd | cut -d":" -f1`; do
      crontab -l -u $USER | grep -v "no"
  done
  
  # string manipulation - I can't even get started
  echo "
  And here I try to put the commmand output into a string so I can   manipulate it further, and use an if/then/fi on the product:
  "
  for USER in `cat /etc/passwd | cut -d":" -f1`; do
      STRING="$(crontab -l -u $USER | grep -v no)"
      echo "STRING: $STRING"
  done
  </code></pre>
  
  <p>BTW, is there an easier way to get code to format correctly here than pasting in 4 spaces at the beginning of each line? I must have experimented for 40 minutes. Not complaining, just asking.</p>