13

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 than grep foo < <(tac file)' (process substitution)?,
specifically by the line
"This question was motivated by "Reverse grepping", about greping a huge file from bottom up.".)

22
  • 4
    The proper spelling is obviously greping. Commented Jul 24, 2014 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).
    – user85526
    Commented Jul 24, 2014 at 14:42
  • 15
    The standard in the Unix community is grepping. Thich is not so unusual- riding a sled becomes sledding taking a step becomes stepping.
    – Jim
    Commented Jul 24, 2014 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.
    – user85526
    Commented Jul 24, 2014 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. Commented Jul 24, 2014 at 15:38

7 Answers 7

18

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.

13

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".

1
  • 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
    Commented Jul 24, 2014 at 20:13
8

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.

1
  • 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
    Commented Jul 25, 2014 at 0:15
4

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"?

4
  • 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
    Commented Jul 25, 2014 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. Commented Jul 25, 2014 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
    Commented Jul 25, 2014 at 15:59
  • @supercat Agreed. Very good observation. Commented Jul 25, 2014 at 16:11
2

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.

2

Since grep (pronunciation) 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.

9
  • 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. Commented Jul 24, 2014 at 13:51
  • 1
    If 'grep' rhymes with 'step', there is no schwa around. Commented Jul 24, 2014 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). Commented Jul 24, 2014 at 13:53
  • 1
    When you put it that way, grep always makes me weep, so maybe that would be more appropriate.
    – Jay
    Commented Jul 24, 2014 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. Commented Jul 24, 2014 at 14:23
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .