All of lore.kernel.org
 help / color / mirror / Atom feed
* another cleanup: "grep ... >/dev/null" -> "grep -q"?
@ 2017-03-25 19:22 Robert P. J. Day
  2017-03-27 10:22 ` Burton, Ross
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2017-03-25 19:22 UTC (permalink / raw)
  To: OE Core mailing list


  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
========================================================================



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: another cleanup: "grep ... >/dev/null" -> "grep -q"?
  2017-03-25 19:22 another cleanup: "grep ... >/dev/null" -> "grep -q"? Robert P. J. Day
@ 2017-03-27 10:22 ` Burton, Ross
  0 siblings, 0 replies; 2+ messages in thread
From: Burton, Ross @ 2017-03-27 10:22 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

On 25 March 2017 at 19:22, Robert P. J. Day <rpjday@crashcourse.ca> wrote:

>   1) can most of those be simplified with "grep -q"?
>

Yes.


>   2) is there any need for "egrep" in that last match?
>

egrep is grep -E, but that regex is a valid basic RE, so that can just be
grep.

Ross

[-- Attachment #2: Type: text/html, Size: 929 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-27 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-25 19:22 another cleanup: "grep ... >/dev/null" -> "grep -q"? Robert P. J. Day
2017-03-27 10:22 ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.