Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Nov 2000 12:50:47 -0800
From:      "Crist J . Clark" <cjclark@reflexnet.net>
To:        Don Read <dread@texas.net>
Cc:        freebsd-questions@FreeBSD.ORG, Steve Price <sprice@hiwaay.net>
Subject:   Re: 'crontab -e' woes
Message-ID:  <20001104125046.R75251@149.211.6.64.reflexcom.com>
In-Reply-To: <XFMail.001104022111.dread@texas.net>; from dread@texas.net on Sat, Nov 04, 2000 at 02:21:11AM -0600
References:  <20001101234720.J75251@149.211.6.64.reflexcom.com> <XFMail.001104022111.dread@texas.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 04, 2000 at 02:21:11AM -0600, Don Read wrote:

[snip]
 
> Why all the futzing around with ex/vi/ed ?
> 
> localhost.dread$ crontab -l | grep -v "^#"
> 46 3-23/3 * * * bin/getsignups  > /dev/null
> 
> localhost.dread$ crontab -l | sed 's/^46 /16 /' | crontab -
> 
> localhost.dread$ crontab -l | grep -v "^#"
> 16 3-23/3 * * * bin/getsignups  > /dev/null

That's not going to work very well since each time you execute it you
will be adding those three lines like,

  # DO NOT EDIT THIS FILE - edit the master and reinstall.
  # (/tmp/crontab.iTfPR40035 installed on Fri Nov  3 21:50:01 2000)
  # (Cron version -- $FreeBSD: src/usr.sbin/cron/crontab/crontab.c,v 1.12 1999/08/28 01:15:52 peter Exp $)

To the top. If you had the second command like,

  $ crontab -l | tail +4 | sed '1s/^/#/' | crontab -

It would do what the original poster wanted. But I do not see why he
cannot get the vi(1) to work. And I really cannot ficure out why
sometimes it works and sometimes it does not work for me.
-- 
Crist J. Clark                           cjclark@alum.mit.edu


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001104125046.R75251>