So I have a file full of generated code that I would like to characterize without the compiler getting in the way. I would like to know how many times the string "xor" appears in the file, when frequently it occurs several times on one line.
grep -c doesn't cut it since it just counts lines. Dave suggested a greedy search, but I must have mis-implented it. Byron cheated and wrote me a python script. Anyone have some cool shell-fu that will count instances of a string? Scott
-------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/mailman/listinfo/uug-list
