Today I made a small and simple script to make my crontabs more readable. The
usage is quite simple. Run te script and redirect the output to a file.
Review this file. Then when the file is ok,
load it with crontab <file>
The script:
#! /usr/bin/env bash
crontab -l | while read min hour day month wday regel
do
if [ x${min:0:1} = "x#" ]
then
echo "${min}" "${hour}" "${day}" "${month}" "${wday}" "${regel}"
else
if [ x${min:0:1} = "x" ]
then
echo
else
printf "%-7s %-7s %-7s %-7s %-7s %s" "${min}" \
"${hour}" "${day}" "${month}" "${wday}" "${regel}"
echo
fi
fi
done | sed 's/[ ]*$//'