Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

In a discussion that involves talking about the program named "grep", the activity of applying the program to some data is often referred to as "greping".

I was writing - still informally - about such a discussion, and was unsure how to write that word, and why.

  • The activity of using or applying the tool "grep" is called "greping" when speaking. How to write this word, and why?

    • What about the variants
      • 'greping'
      • 'grepping'
      • 'grep'ing'
      • 'grep-ing'
  • Are there rules to derive such a word, at least partially?



(This question was motivated by
Why is tac file | grep foo' (piping) faster thangrep foo < <(tac file)' (process substitution)?,
specifically by the line
"This question was motivated by "Reverse grepping", about greping a huge file from bottom up.".)

share|improve this question
4  
The proper spelling is obviously greping. –  John Lawler Jul 24 at 14:05
3  
I get really annoyed when people insert strange characters or punctuation to make a verb from a proper noun or make an abbreviation plural like "CD's" (which in my opinion should just be CDs). –  George Pompidou Jul 24 at 14:42
14  
The standard in the Unix community is grepping. Thich is not so unusual- riding a sled becomes sledding taking a step becomes stepping. –  Jim Jul 24 at 14:45
1  
But why use an apostrophe? It's just not the case for it. You're not contracting two words and you're not implying a pause in between the two syllables. –  George Pompidou Jul 24 at 14:51
1  
In case it helps: there is a similar example from physics, where the adjective "gapped" is derived from "gap". Many nonnative speakers misspell it as gaping, which has a different meaning and different pronunciation. –  painfulenglish Jul 24 at 15:38

7 Answers 7

up vote 18 down vote accepted

The words like that will try to follow the current word-form rules in similar words. (to trap - trapping). The word "grep" is already in some dictionaries and it follows this theory:

verb (greps, grepping, grepped) [with object]:

Search for (a string of characters) using grep.

share|improve this answer

I was taught in elementary school that if a syllable ends with a vowel, the vowel is normally long, while if it ends with a consonant, the vowel is short. Also that if there is a vowel followed by one consonant in the middle of a word, the consonant is part of the next syllable, while if a vowel is followed by two consonants (that do not work together to make a single sound, like "th"), that the first consonant ends the first syllable and the second consonant begins the second syllable.

Thus: "hatter" - syllables are "hat" and "ter", "a" is short.

"hater" - syllables are "ha" and "ter", "a" is long.

(Yes, there are lots of exceptions, but I was taught this as the general rule.)

As a consequence of this, if a word ends with a single vowel followed by a single consonant, than to keep the vowel short, you must double the consonant when adding -ed or -ing.

Example: "fit" becomes "fitted" and "fitting".

There is no need to double a consonant if the word already ends in two consonants. Like "list" becomes simply "listed" and "listing".

So by these conventional rules, "grep" would become "grepped" and "grepping". If you wrote "greped", we would make the first "e" long, like "greep'd".

share|improve this answer
2  
When in doubt, go back to what you learnt in elementary school. You actually learnt useful stuff there - you just didn't realize it half the time. Big plus-one for this one. –  Floris Jul 24 at 20:13

This isn't a very technical answer, but googling "grepping" returns 354,000 results. Googling "greping" only returns 47,300 results and suggests that you meant "grepping" instead. It seems that "grepping" is the correct usage.

share|improve this answer
4  
"Googling" itself is an example of the same phenomenon - deriving a verb which means "to use [the tool from which it is derived]". In this case, "google" is conjugated similarly to "haggle". –  trm Jul 25 at 0:15

Hyphenated suffixes are usually an idiosyncratic choice that mainly serves stylistic purposes; as far as grammar is concerned, hyphens are normally reserved for words where the suffix is a proper noun or itself a large word (three or more syllables), although there is no consensus and there are exceptions to the rule.[1]

For me there is no need to put quote marks around it either. There is an established body of similarly-derived words in reputable dictionaries by now. That is, names of digital tools used as verbs.

Both Merriam-Webster & Oxford: photoshop, google
Oxford only: skype, even facebook(v.) !!

The only thing left to consider is whether to duplicate the last letter of the root. This has been tackled in other questions[2], although again there is no consensus and in my experience it is often a matter of dialect. It is a lot more common to omit the duplication in American English than in British, despite the obvious challenge that omission creates in pronouncing the word correctly.

In any case, Oxford Dictionary gives the word as grepping.

grep | verb (greps, grepping, grepped)

[with object]

Search for (a string of characters) using grep.


References:

[1] http://www.dailywritingtips.com/close-the-gap-on-prefixes-and-suffixes/

[2] What is the rule for duplicating the last letter when adding "-ed"?

share|improve this answer
    
Hyphens are also proper in cases where concatenating a prefix or suffix without a hyphen could cause awkwardness or ambiguity, as with re-cover (to cover again). Use of a hyphen in cases where the suffixes are applied to something whose spelling and capitalization are semantically important would seem appropriate unless the audience is sufficiently familiar with the term in question to recognize how the computer would expect it to be written. –  supercat Jul 25 at 15:08
    
@supercat I completely agree, but I believe this falls under 'idiosyncratic use.' It is ultimately an open-ended choice for the writer, depending maybe on the audience and the context. –  Guybrush Threepwood Jul 25 at 15:46
1  
If use of the tool required spelling its name correctly, and one's audience may be unfamiliar with the correct spelling, using obscure punctuation to avoid changing the spelling of the root "word" may be a least-of-evils choice, especially in the absence of reliable typographical distinctions (IMHO, the space between the root and suffix would make grepping even uglier than grep-ing, but if there were less space the former would be preferred). –  supercat Jul 25 at 15:59
    
@supercat Agreed. Very good observation. –  Guybrush Threepwood Jul 25 at 16:11

Arguments in other answers for doubling the p are compelling, but also note that Wiktionary (linked to but not quoted in another answer) specifically shows such spelling of grep's present participle, among other forms:

grep (third-person singular simple present greps, present participle grepping, simple past and past participle grepped)

making it clear that at least one dictionary shows the p in grep doubling in its participles.

share|improve this answer

Since grep (pronounciation) rhymes with step, I would follow the pattern with stepping and write grepping.

(Writing it as greping makes me want to move short e (/ɡɹɛp/) in the first syllable to a long e, /ɡɹip/, rhyming with weeping. Your mileage may vary.)

Grep comic

Similarly, while awking seems straightforward, I'd favor sedding over seding.

share|improve this answer
    
Yes, I like the variant "grepping" too - what feels wrong is that the second "p" somehow becomes part of the tool name, and changing that makes no sense to me, it's just not a "word" in that sense I think. –  Volker Siegel Jul 24 at 13:51
1  
If 'grep' rhymes with 'step', there is no schwa around. –  Edwin Ashworth Jul 24 at 13:53
1  
I've never heard anyone pronounce grep with a schwa. And I've no reason to disagree with Only words with two or more syllables may have a schwa (except in contexts where words like a, the, to happen not to be stressed, but I don't see how that could apply to grep). –  FumbleFingers Jul 24 at 13:53
1  
When you put it that way, grep always makes me weep, so maybe that would be more appropriate. –  Jay Jul 24 at 14:13
2  
@Volker That happens all the time. The present participle of to Google is Googling, not *Googleing. When you start inflecting words that are acronyms or trademarks in origin, you have to accept that you are going to change the spelling of the word at some point, and probably also the logic behind the original acronym. Such is language. –  Janus Bahs Jacquet Jul 24 at 14:23

Simply stick "-ing" to a noun to verb it:

  • tool -> tooling
  • shed -> shedding

The reason for the extra "d" in "shedding" is that the "shed" part of "sheding" sounds different.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.