From owner-freebsd-questions Wed Nov 1 19: 4:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from wormhole.bluestar.net (wormhole.bluestar.net [208.53.1.61]) by hub.freebsd.org (Postfix) with ESMTP id 8878D37B4C5 for ; Wed, 1 Nov 2000 19:04:37 -0800 (PST) Received: from bsd.planetwe.com (bsd.planetwe.com [64.182.69.158]) by wormhole.bluestar.net (8.10.1/8.10.1) with ESMTP id eA234Ql10846 for ; Wed, 1 Nov 2000 21:04:27 -0600 (CST) Received: (from steve@localhost) by bsd.planetwe.com (8.9.3/8.9.3) id VAA62896 for freebsd-questions@freebsd.org; Wed, 1 Nov 2000 21:04:26 -0600 (CST) (envelope-from steve) Date: Wed, 1 Nov 2000 21:04:26 -0600 From: Steve Price To: freebsd-questions@freebsd.org Subject: 'crontab -e' woes Message-ID: <20001101210426.A57642@bsd.planetwe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i X-Operating-System: FreeBSD 5.0-CURRENT i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Howdy all, Don't know if it is just a couple of days of absolutely no sleep or what but I've been scratching my over head what should be a simple problem. Basically what I'm trying to do is setup a non-interactive script that edits my crontab. When I type the following commands in it comments out the first entry. However, when I run it by redirecting stdin from a file it doesn't work. From the looks of it (note the 37 -> 38 change) the file is being updated but crontab is ignoring the change. steve@bsd(/tmp)$ crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.teFMi62568 installed on Wed Nov 1 20:47:27 2000) # (Cron version -- $FreeBSD: src/usr.sbin/cron/crontab/crontab.c,v 1.12 1999/08/28 01:15:52 peter Exp $) */1 * * * * /home/steve/bin/bogus.sh steve@bsd(/tmp)$ cat cmds 1s/^/#/ wq steve@bsd(/tmp)$ env VISUAL=/bin/ed crontab -e < cmds 37 38 crontab: no changes made to crontab steve@bsd(/tmp)$ cat cmds | env VISUAL=/bin/ed crontab -e 37 38 crontab: no changes made to crontab steve@bsd(/tmp)$ Can anyone tell what I'm doing wrong? Thanks. -steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message