I have 5 solaris boxes, some have Solaris 10 and some have Solaris 9.
All of them have many cronjobs in their crontabs.
I would like to know number of active cronjobs available, so I manually count the cronjobs.
Now I am looking for a command [bash shell I am using] to count the number of active cronjobs.
I have tried
crontab -l|wc -l, but my crontab contains many comments lines which are also counted with my command.
What I have tried
crontab -l|wc -l
What I am expecting
A bash shell command to count the number of active cronjobs (excluding comments lines).
cronimplementation are you using? Some of them allow directives like
@hourly, which also define jobs.
crons are actually improved rewrites of
mcron. They are all compatible with the original one, but usually they add something new too, by introducing directives with proprietary syntax. Anyway, if you use no directives, you can safely ignore my question.