On Wed, 27 Jul 2005, Paul Biggar wrote:
> grep can find two words one after the other by doing 'grep "word1
> word2"'. Does anybody know a way of making this return a case where
> word1 is at the end of one line, and word2 is at the start of the
> next.
Substitute text1 and text2.
perl -ne '$f and /^text1/ and print $l,$_;$f=/text2$/;$l=$_'
> On a similar note, I'm looking for a diff/merge tool that takes the
> flow of a paragraph into account. I'm trying to merge two slightly
> different copies of the same latex document. I saw texdiff, but its
> not exactly what I'm looking for, which would be more like a the
> standard diff tool. I also looked at wdiff, but it doesn't really
> merge things, and looks like it will be hard to use. Can anyone
> suggest better?
Emacs: M-x ediff
/Ole
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!