#!/bin/sh
#
# showcrons: Print the contents of /etc/crontab and of any user crons
# found on the system.  Could also be taught to look in other places,
# and / or anacron, etc.
#
# Extremely simple and public domain.  <dannyman@toldme.com>

users=`awk -F : '{print $1}' < /etc/passwd`

for user in $users; do
        crontab -l -u $user 2>/dev/null >/dev/null &&\
          echo "" && echo "crontab for ${user}:" && crontab -l -u $user
done

