Building cross reference -- how?

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Sun Oct 13 06:14:04 UTC 2013


Hi all,

I want to build cross reference on certain lines in files.  I can
extract those lines into a file, say in format
    filename,...line...

Now, how do I build cross reference?

For example, if I have
    file1, one two three red
    file2, four five
    file3, red blue yellow
    file4, blue one
Then, cross reference for "red" should give me first line (file1) and
3rd line (file3).  And, cross reference for "red one" should give me
only the first line (file1).  I guess I can do
    fgrep -e red
    fgrep -e red | fgrep -e one

Is there a program, similar to "updatedb" and "slocate"?
-- 
William
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list