News for hackers. Stuff that matters.
Re:Show HN: Command Line Challenge by coherentpony on Thursday January 26, 2017 @01:51PM (#13494097)

    grep -rl 500 .
wasn't accepted. Am I wrong or is it wrong?
Re:Show HN: Command Line Challenge by snuxoll on Thursday January 26, 2017 @01:55PM (#13494141)
Only filenames matching access.log should be returned.

Unfortunately, since shopt globstar is disabled I ended up needing to do this:

    grep 500 $(find . -type f -iname "access.log*")
Re:Show HN: Command Line Challenge by JoshTriplett on Thursday January 26, 2017 @02:25PM (#13494415)
You could also include "shopt -s globstar; " at the beginning of your line.
Re:Show HN: Command Line Challenge by joshka on Friday January 27, 2017 @01:14AM (#13498107)
grep -r 500 --include access.log
Re:Show HN: Command Line Challenge by slavik81 on Thursday January 26, 2017 @08:29PM (#13497015)
That returns the filenames in the format "./access.log" but it wanted "access.log". It's a bug.

I used echo -e 'access.log\naccess.log.1\nREADME'. :D

Re:Show HN: Command Line Challenge by coherentpony on Thursday January 26, 2017 @10:39PM (#13497535)
Gotcha. Thanks.
Re:Show HN: Command Line Challenge by Galanwe on Thursday January 26, 2017 @10:30PM (#13497477)
Hahahaha I did the exact same thing
Re:Show HN: Command Line Challenge by leblancfg on Thursday January 26, 2017 @01:54PM (#13494131)
You are: grep matches strings, not integers.

    grep -rl '500'
works just fine.
Re:Show HN: Command Line Challenge by tne on Thursday January 26, 2017 @07:00PM (#13496587)
There is no concept of an integer on an argument vector. Quoting in bash just escapes IFS characters (usually whitespace) to control whether to include them in a given argument on the vector, but these arguments (as passed to exec) are always character strings (with or without quoting).
Re:Show HN: Command Line Challenge by godelski on Friday January 27, 2017 @12:37AM (#13497989)
Interestingly enough

grep -rl "500" .

doesn't work because it returns with the "./".