LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-31-2012, 02:28 AM   #1
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 226

Rep: Reputation: 90
-current : grep behavior changed?


With the latest Slackware64-current install (July 15th or thereabouts), 'grep' (version 2.13) now displays warnings when a directory is specified (typically as an expanded wildcard). For example,
Code:
$ grep sample /etc/x*
grep: /etc/xdg: Is a directory
grep: /etc/xml: Is a directory
/etc/xpdfrc:# This sample config file demonstrates some of the more common
In 13.37, grep (version 2.7) silently ignores directories. I also have a -current install from June 22nd that also behaved silently with regard to directories (it also used grep-2.7).

Are others experiencing this same behavior? Is there a way to configure grep to get back the old (silent) behavior?

Last edited by saulgoode; 08-01-2012 at 01:44 AM.
 
Old 07-31-2012, 02:43 AM   #2
e5150
Member
 
Registered: Oct 2005
Location: Sweden
Distribution: Slackware
Posts: 73

Rep: Reputation: 41
Yes, I've had a few scripts failing due to grep exiting with non-zero status because it regards these as errors. It is fixed by using "grep --directories=skip" or setting GREP_OPTIONS="-d skip", as explained in the man page.
 
Old 07-31-2012, 03:06 AM   #3
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,525

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
i think it's this commit?
 
Old 08-01-2012, 01:46 AM   #4
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 226

Original Poster
Rep: Reputation: 90
Thanks for the responses. I've marked the thread solved as using the environment setting will address most of my needs. Nonetheless, it seems a rather poor choice by upstream to so fundamentally modify the behavior of a core utility (if it was done intentionally).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] grep behavior using a 'for' loop Tech109 Linux - General 8 11-08-2011 04:23 PM
Weird behavior with grep - getting ^M in output when they are not in the file Stephanie Seney Programming 1 10-04-2011 12:21 PM
Howto find out files that are changed less than 10 hours with grep command coolloo_djack Programming 1 03-20-2010 01:05 PM
strange behavior of find or grep alenD Programming 4 09-21-2007 06:35 AM
How xterm get known that current dir changed? pvv Programming 3 03-15-2004 08:27 AM


All times are GMT -5. The time now is 09:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration