From owner-freebsd-current Tue Nov 13 18:43:44 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id D00B837B416; Tue, 13 Nov 2001 18:43:40 -0800 (PST) Received: from hades.hell.gr (patr530-a128.otenet.gr [212.205.215.128]) by mailsrv.otenet.gr (8.11.5/8.11.5) with ESMTP id fAE2hRM07653; Wed, 14 Nov 2001 04:43:28 +0200 (EET) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id fAE2hQn07118; Wed, 14 Nov 2001 04:43:26 +0200 (EET) (envelope-from charon@labs.gr) Date: Wed, 14 Nov 2001 04:43:25 +0200 From: Giorgos Keramidas To: cjclark@alum.mit.edu Cc: John Baldwin , Robert Watson , current@FreeBSD.ORG, Alexander Leidinger Subject: Re: daily run output & passwd diff Message-ID: <20011114024325.GA7072@hades.hell.gr> References: <20011113153102.B61915@blossom.cjclark.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011113153102.B61915@blossom.cjclark.org> User-Agent: Mutt/1.3.23.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2001-11-13 15:31:02, Crist J. Clark wrote: > > echo "$host passwd diffs:" > - diff $bak/master.passwd.bak /etc/master.passwd |\ > - sed 's/^\([<>] [^#][^:]*\):[^:]*:/\1:(password):/' > + diff -I '^#' $bak/master.passwd.bak /etc/master.passwd |\ > + sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/' > mv $bak/master.passwd.bak $bak/master.passwd.bak2 > cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 > fi This version looks great. I'm not sure if you need to ignore lines that have whitespace before the initial '#' character, but this one is already good enough :) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message