Return-Path: Received: from smtp685.redcondor.net (smtp685.redcondor.net [208.80.206.85]) by mail.openembedded.org (Postfix) with ESMTP id ADFEF6E660 for ; Sat, 25 Mar 2017 19:22:42 +0000 (UTC) Received: from astoria.ccjclearline.com ([64.235.106.9]) by smtp685.redcondor.net ({20c8e40f-6b6c-4c9e-abff-1640ea7bf404}) via TCP (outbound) with ESMTPS id 20170325192242520_0685 for ; Sat, 25 Mar 2017 12:22:42 -0700 X-RC-FROM: X-RC-RCPT: Received: from [174.118.92.171] (port=41700 helo=crashcourse.ca) by astoria.ccjclearline.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1crrGm-0002Ij-Oz for openembedded-core@lists.openembedded.org; Sat, 25 Mar 2017 15:22:36 -0400 Date: Sat, 25 Mar 2017 15:22:34 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: OE Core mailing list Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 X-MAG-OUTBOUND: ccj.redcondor.net@64.235.106.9/32 Subject: another cleanup: "grep ... >/dev/null" -> "grep -q"? X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Mar 2017 19:22:44 -0000 Content-Type: text/plain; charset=US-ASCII something else that grates on me: $ grep "grep.*/dev/null" * autotools.bbclass: if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then autotools.bbclass: if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then autotools.bbclass: elif grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then autotools.bbclass: if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then insane.bbclass: statement = "grep -e '%s/[^ :]\{1,\}/[^ :]\{1,\}' %s > /dev/null" % (exec_prefix, path) insane.bbclass: statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog insane.bbclass: statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog insane.bbclass: gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config rootfs-postcommands.bbclass: if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then utils.bbclass: if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null $ 1) can most of those be simplified with "grep -q"? 2) is there any need for "egrep" in that last match? rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================