From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 30 14:46:20 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16636106566C for ; Tue, 30 Mar 2010 14:46:20 +0000 (UTC) (envelope-from m.nesterovych@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id 929FB8FC1F for ; Tue, 30 Mar 2010 14:46:19 +0000 (UTC) Received: by fxm25 with SMTP id 25so33355fxm.3 for ; Tue, 30 Mar 2010 07:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=z7COhwSjGjrBNBG+wz0mBQGL3Dxg/6+5fK3Wqp3sk9M=; b=gyiHMwvbF2SvFsVUNaeryCI3TzKXpFnmcsX22knSx2DEjF5mIFVr67jP1W8Q9cOHwH zymsx/nqQ76UtxTPJFoou1L3DUQDlWDs+VfgEb3UJYHT0As4mESK/3JjzlrVs1IYcpC3 DTluTy1z0xK6Mi2zuARgX/I9w9g/BYXap0F80= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=fbnT+Umurs7aMsUl48xltFh/cD8F4DnuUlW1hvLiGKGeLWz7r2CuZ0uRxfbFgA8BlT NGd6j6LNHqUuDROtGHi6DoZgAUZY9V/kdo7ujoi6Zkdkl7pEBMgG2i8LF2t6t5R2RTLm oZt1aknhWMkDqHKYLQOcgFS9v13KVt+EnhUwk= Received: by 10.86.124.35 with SMTP id w35mr5314634fgc.49.1269958549518; Tue, 30 Mar 2010 07:15:49 -0700 (PDT) Received: from [192.168.0.102] ([62.80.162.42]) by mx.google.com with ESMTPS id 13sm3931902fxm.2.2010.03.30.07.15.48 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 07:15:48 -0700 (PDT) From: Mark nesterovych To: hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Date: Tue, 30 Mar 2010 17:15:46 +0300 Message-ID: <1269958546.3456.14.camel@mark-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Cc: Subject: grep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: m.nesterovych@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 14:46:20 -0000 Hi all. Decided to write BSD licensed grep and provide it to FreeBSD project if success. But encountered with a problem, which I can resolve. I looked through the gnu, OpenBSD sources and posix requirements to this utility, and can't find a solution. Problem is next. System have few utilities [e|f]grep. And have a keys -E -F and -G which force the certain regexp processing mode. But I can't find what to do if mode caused by the utility name is another than mode of a key provided to it. If an error should be printed and utility should exit. Or may be a key must be more preferable. OpenBSD use the latest key provided in alphabetical order. Gnu's looks for a single key, error if 2 ore more provided. Posix requirements aks only for one key to be provided. How to deal with this in right way ? -- Mark Nesterovych