Date: Sun, 26 Jun 2016 12:44:48 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Matthew Seaman <matthew@FreeBSD.org> Cc: freebsd-questions@freebsd.org Subject: Re: grep and anchoring Message-ID: <alpine.BSF.2.20.1606261244150.84448@wonkity.com> In-Reply-To: <9fc6d5df-108b-5663-5a31-92ca915a9604@FreeBSD.org> References: <20232C89-B821-41EC-9188-C2A19C679BD8@danieldk.eu> <20160626163411.d05f863e.freebsd@edvax.de> <362EE01F-4B49-4ADB-A3A6-43F852FFF87F@danieldk.eu> <9fc6d5df-108b-5663-5a31-92ca915a9604@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 26 Jun 2016, Matthew Seaman wrote: > On 26/06/2016 15:44, Daniël de Kok wrote: >> Note the anchoring (^), the pattern should only match any four characters at the beginning of the line, so the expected output is ‘1234’ and nothing more. ‘ 123' and '4 12' are not at the beginning of the line and should consequently not be printed to stdout. >> >> For comparison, the output of a recent GNU grep: >> >> — >> % echo "1234 1234 1234" | grep -o '^....' >> 1234 >> — > > You are completely correct -- this is a bug in grep(1) on FreeBSD. In > all current releases including the upcoming 11.0-RELEASE grep is > actually GNU grep version 2.1.5. However, the same bug occurs in > bsdgrep(1): > > % echo 1234 1234 1234 | bsdgrep -o '^....' > 1234 > 123 > 4 12 Yay for compatibility! :) From owner-freebsd-questions@freebsd.org Mon Jun 27 01:31:19 2016 Return-Path: <owner-freebsd-questions@freebsd.org> Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB006A79C25 for <freebsd-questions@mailman.ysv.freebsd.org>; Mon, 27 Jun 2016 01:31:19 +0000 (UTC) (envelope-from gregory.orange@calorieking.com) Received: from pandora.au.calorieking.net (mail.au.calorieking.net [115.70.179.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AFF424C9 for <freebsd-questions@freebsd.org>; Mon, 27 Jun 2016 01:31:18 +0000 (UTC) (envelope-from gregory.orange@calorieking.com) Received: from pandora.au.calorieking.net (localhost [127.0.0.1]) by pandora.au.calorieking.net (Postfix) with ESMTP id F212110C for <freebsd-questions@freebsd.org>; Mon, 27 Jun 2016 09:24:30 +0800 (WST) X-Virus-Scanned: amavisd-new at calorieking.com Received: from pandora.au.calorieking.net ([127.0.0.1]) by pandora.au.calorieking.net (mail.au.calorieking.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kwVQ6_yPSF3f for <freebsd-questions@freebsd.org>; Mon, 27 Jun 2016 09:24:26 +0800 (WST) Received: from [192.168.2.118] (freia.ne1.au.calorieking.net [192.168.2.118]) by pandora.au.calorieking.net (Postfix) with ESMTPSA id 9C4F5C8 for <freebsd-questions@freebsd.org>; Mon, 27 Jun 2016 09:24:26 +0800 (WST) Subject: Re: freebsd-update && locally modified files To: freebsd-questions@freebsd.org References: <20160623151128.GA25400@ice.42.org> From: Gregory Orange <gregory.orange@calorieking.com> Message-ID: <57708049.8040509@calorieking.com> Date: Mon, 27 Jun 2016 09:24:25 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160623151128.GA25400@ice.42.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 27 Jun 2016 01:31:19 -0000 Hi Stefan, On 23/06/16 23:11, Stefan `Sec` Zehl wrote: > | The following files are affected by updates, but no changes have > | been downloaded because the files have been modified locally: > | /etc/mail/freebsd.cf > | /etc/mail/freebsd.submit.cf > | /etc/mail/sendmail.cf > | /etc/mail/submit.cf > | /var/db/mergemaster.mtree > > The obvious solution of deleting them and letting freebsd-update install > run did not restore those files. On the rare occasion that happens, I tend to grab the files from a pristine installation and put them in place, as well as copies (with a .dist suffix) in case it recurs. Greg.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1606261244150.84448>