From owner-freebsd-questions Sat Nov 4 12:51:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id C86F137B4C5 for ; Sat, 4 Nov 2000 12:51:09 -0800 (PST) Received: from 149.211.6.64.reflexcom.com ([64.6.211.149]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Sat, 4 Nov 2000 12:49:41 -0800 Received: (from cjc@localhost) by 149.211.6.64.reflexcom.com (8.11.0/8.11.0) id eA4KovI49148; Sat, 4 Nov 2000 12:50:57 -0800 (PST) (envelope-from cjc) Date: Sat, 4 Nov 2000 12:50:47 -0800 From: "Crist J . Clark" To: Don Read Cc: freebsd-questions@FreeBSD.ORG, Steve Price Subject: Re: 'crontab -e' woes Message-ID: <20001104125046.R75251@149.211.6.64.reflexcom.com> Reply-To: cjclark@alum.mit.edu References: <20001101234720.J75251@149.211.6.64.reflexcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from dread@texas.net on Sat, Nov 04, 2000 at 02:21:11AM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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