Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 07-31-2012, 03:28 AM   #1
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
-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,
$ 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 02:44 AM.
Old 07-31-2012, 03:43 AM   #2
Registered: Oct 2005
Location: Sweden
Distribution: Slackware and Alpine
Posts: 123

Rep: Reputation: 91
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, 04:06 AM   #3
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,676

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
i think it's this commit?
Old 08-01-2012, 02:46 AM   #4
Registered: May 2007
Distribution: Slackware
Posts: 288

Original Poster
Rep: Reputation: 155Reputation: 155
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).


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 05:23 PM
Weird behavior with grep - getting ^M in output when they are not in the file Stephanie Seney Programming 1 10-04-2011 01:21 PM
Howto find out files that are changed less than 10 hours with grep command coolloo_djack Programming 1 03-20-2010 02:05 PM
strange behavior of find or grep alenD Programming 4 09-21-2007 07:35 AM
How xterm get known that current dir changed? pvv Programming 3 03-15-2004 09:27 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:19 AM.

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