Subject: grep should support -l and -n together

From: Mathieu Jobin <[email-masked]>
Date: Tue, 6 Sep 2016 10:36:22 -0400

I like using

> grep -rn pattern dir

a lot because it returns all the result with the line numbers
I think its one of the most common use case of grep.

recently I started using

> grep -rl pattern dir

only returning the list of files, without the content appended.
I find that really useful

but when using -rl , -n is ignored, which is sad, because I could pipe in
my editor and it would open the files at the proper line

for example

> grep -rln "[^a-z]if .\+ = .\+" app  | xargs kate

unfortunately, the line numbers is not present on the grep output here

should you chose not to support this, then it should probably error out

cheers,

-- 
Mathieu Jobin