There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
It reads in the line without the trailing LF. I was just preparing my Awk One-Liners e-book and noticed that I had explained it incorrectly before. When a line gets read in $0, LF gets stripped, so if it ended with CRLF, then now it ends with CR and \r$ matches that CR.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
Education Sponsors
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
It reads in the line without the trailing LF. I was just preparing my Awk One-Liners e-book and noticed that I had explained it incorrectly before. When a line gets read in $0, LF gets stripped, so if it ended with CRLF, then now it ends with CR and \r$ matches that CR.
Reply To This Comment