[NTLUG:Discuss] scratching head
Chris Cox
cjcox at acm.org
Thu Feb 27 18:51:37 CST 2003
Steve Baker wrote:
> Carl Haddick wrote:
>
>> In other words, type all lines in all text files that contain at least
>> three arbitrary characters, skipping lines that are 0, 1, or 2
>> characters in length.
>>
>> Did I get it right? Do I win anything?
>
>
> That's certainly what it does...the question is why? - and why is it in
> someones .sig ?
>
>>> find . -type f | xargs file | grep -i text | cut -f1 -d: | xargs
>>> grep "..."
Ok guys... this simple one line is used to find a piece of text
in all text files within a directory.
The "..." is mere elipses... you fill in the string you are looking for.
I know this is the correct answer, because most people know this
is one of my favorite one liners.
>
>
> ...and if that's what it does, it's got a bug in it. Suppose I have
> file called:
>
> texture_map.png
>
> ...well, let's just say it's not going to be a pretty sight!
Uh... ok. But I think you're saying that because you assumed the
elipses was a literal grep '...', a valid misunderstanding.
More information about the Discuss
mailing list