4 ms·
>How do you deal with words like "---" in your text that look like the match separator of grep? For this one you can use the "--" flag to signal that everythin
by bkq 7y ago
>How do you deal with words like "---" in your text that look like the match separator of grep?
For this one you can use the "--" flag to signal that everything else should be treated as an argument.
$ grep -rn -- -
- heinrichhartman 7y agoyeah, I should have made that more clar: I was talking about the sed expression on p17. It looks for "--" in stdin. This could alsp be a word. I realize now that the first tr before removes all non a-zA-Z characters, so in this case it should not be an issue. However intermixing text with separators is not trivial. There are reasons we use JSON/XML for exchanging structured data.