On Thu, 28 Jul 2005, Brian Foster wrote:
> possible confusion/unclarity in Paul's request. it looks to me
> that Paul's script will _only_ print matches when word1 is at
> the end of a line and word2 is at the start of the next line.
No wait.. that *is* exactly what PB asked for, I quoted his request
before my awk suggestion:
>> 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.
"word1 at end of one line, word2 at start of next" seems clear to
me.
> (it also does not allow trailing spaces at the end of line 1 or
> leading spaces on line 2, both of which are legal and harmless in
> (La)TeX.)
Those can be fixed, change the match for word1 to $NF == "word1", the
word2 match is already like that, but for $1, so /already/ ignores
trivial whitespace padding.
regards,
--
Paul Jakma paul at clubi.iepaul at jakma.org Key ID: 64A2FF6A
Fortune:
Men love to wonder, and that is the seed of science.
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!