[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#4316: cron -- crontab -l prints excess header



Brian C. White wrote:
> 
> Package: cron
> Version: 3.0pl1-34
> 
> Running "crontab -l" has a bad habit of displaying header information
> that is not actually part of the crontab.
> 
> For example:
> 
> $ crontab -l -u gnats
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (- installed on Mon Jul 29 14:07:28 1996)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
> 5,15,25,35,45,55 * * * * /usr/lib/gnats/queue-pr --run
> 
> [snip]
>
> Would you mind stripping these first three lines from the "crontab -l"
> output?

Yes, because I think there is useful information there (primarily
the second line, with the file name (usually) and date).

Since it's in a script anyway, why not strip it yourself:

 crontab -l |sed -e '1,/^# (Cron version/ d'

(actually "sed -e '1,3 d'" would proably be sufficient.)

I'm going to close this one.

Steve Greenland

-- 
The Mole - I think, therefore I scream 



Reply to: