On Thu, 26 Apr 2001, Stephen Shirley wrote:
> > Have you tried the getline function in awk?
> Excellant (oh yeah, and lots of doh's and head slapping for me). Thanks
> Cormac and Mark.
>Hmm. Couldn't get that working for a while. It seems that using "getline
<file" actually open the file, and leaves the file pointer at the next
line. This means that the next time I call getline I get nothing. I had to
put in "close(file)" to get the expected behaviour. It's fine now that I
know what's up, but it had me confused for a while.
Ps. About the bumble bees, I had meant to include a footnote to say that
yes I know they've solved the problem, but it's still a handy example.
"My mom had Windows at work and it hurt her eyes real bad"
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!