On Tuesday 15 June 2010 17:37:07 Adam wrote: > This is one of those things where I know there must be several dozen > ways to do it, but I can't seem to think of any of them! What I'd like > to do is to get all the text from text file "file" starting with the > line containing the LAST occurrence of "string", through the last line > of "file", and all this will be piped to another program. Anybody have > any ideas? Thanks! > > Adam
If you're searching for a single line, one option would be to reverse- concatenate the file with 'tac' and then search for the /first/ instance of the string. -- Chris -- Chris Knadle [email protected] _______________________________________________ Mid-Hudson Valley Linux Users Group http://mhvlug.org http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug Upcoming Meetings (6pm - 8pm) MHVLS Auditorium Jul 7 - Patent Absurdity - The Movie Aug 4 - Samba Sep 1 - BOINC
