Re: TODO for 1.2 release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In regard to: Re: TODO for 1.2 release, Moses P. Milazzo said (at 4:28pm on...:

>> Better:
>> 
>> find . -name '*.c' -o -name '*.h' -exec egrep '//' {} /dev/null \; | \
>> 	grep -v '://'
>> 
>> (to get rid of false matches on URLs)
>
>Why not:
>
>grep "//" `find . -name "*.[ch]"` | grep -v 'p://'
>
>(the -o option doesn't seem to work as advertised in the man page)

Depends on the man page you read, and the platform you're on.

>Don't forget that ":" is used between the filename and matching line, and
>if your line begins with //, grep -v '://' chucks that valid match.

This is degenerating from the original thread, but you're right that
my grep -v '://' might throw away too much.

I avoid the backticks that you used because in general that could result
in a "line too long" problem, on many UNIXes.  My method is slower by a
lot because it will exec egrep for every file in the list, but it will
never fail because of too many files.   Probably not an issue in this case,
so yours might be better here but it might fail for a larger tree on
some platforms.

In any case Kevin's find/grep did what was needed -- find the files that
have C++ style comments in them.

Tim
-- 
Tim Mooney                              mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J1, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux