Talk:Grep
From Wikipedia, the free encyclopedia
'grep -r foo .' seems more appropriate than 'grep -r foo *'. The former is literally recursively searching the current directory, while the latter is only searching the non-hidden files and directories in the current directory, and their (hidden or non-hidden) subdirectories/files. (meaning it's inconsistent, only ignoring hidden stuff in the current directory, but showing all other hidden stuff below it)
- -r is a gnu-ism and should probably be removed anyway, proper way to do is using find and `` or xargs instead. Lost Goblin 19:39, 2005 May 30 (UTC)
Contents |
[edit] Usage information
Although I'm not asking to make this Wikipedia article into a man page, a few more examples of how to use grep would be nice.
Partly because less technical users have trouble understanding man pages, and therefore they could benefit from explanation here.
I agree, I think this page should have more information..
[edit] abbreviation
according to Jeffrey Friedl's Mastering Regular Expressions 2nd Ed (O'Reilly 2002) grep stands simply for global regular expression print.
Going back even further, it is listed as Global Regular Expression Print in Dale Dougherty's sed & awk (O'Reilly 1990). The assertion that this is a backronym is tenuous. Since when would any Unix user state "search globally for lines matching the regular expression, and print them" when "Global Regular Expression Print" says it all? --59.167.194.142 06:06, 16 November 2006 (UTC)
[edit] Conversational usage as verb
I agree with the comment on the history page requesting citation: if "grep" is ever used with the meaning of "grok", it is simply an error by the ignorant. I don't think that this is an established usage. I think that this claim should be deleted unless someone can provide evidence that there is a community in which this usage is normal. --Bill 20:50, 11 May 2006 (UTC)
-
- It's been about four days, so i've removed it. --Piet Delport 02:38, 15 May 2006 (UTC)
-
-
- I have conversationally used grep in a non technical sense (as in grepping one's mind). Of course, that use was a bit of silliness on my part since I certainly don't have the ability to do a full fledged search of any concepts of any symbolic nature my mind might hold. Root4(one) 04:35, 28 March 2007 (UTC)
-
[edit] Meaning of name
When I first came across grep on a Prime Minicomputer in 1986 it was noted as General-Purpose Random Expresion Parser. It was in an American published user guide. I may still have a copy of it somewhere and will try to check it out. —Preceding unsigned comment added by 193.113.57.167 (talk • contribs) 2006-09-16 01:59:42
- It also looks suspiciously close to a Dutch verb for 'to understand', begrepen. —Preceding unsigned comment added by 66.202.2.241 (talk • contribs) 2006-09-16 01:59:42
-
- Read the Jargon file entry which cites the author of the tool specifically confirming that the origin is the ed command
g/re/pand not any of the other anecdotal sources. Many companies and people may have ascribed backronyms, but we need to be very clear about the original source of the name, and how it was meant to expand. -Harmil 15:33, 24 July 2007 (UTC)
- Read the Jargon file entry which cites the author of the tool specifically confirming that the origin is the ed command

