Hello, I am experimenting currently with gawk-3.1.3-2 trying to grasp the basic principles and I have encountered the following issue. I have a simple text file data.txt containing this data: "aaarnrnbbbrnrnccc", i.e. there is no "r" or "n" or "rn" at the end of the file. I wonder, what the following gawk-script should output: BEGIN{ RS="nn+"; ORS="";OFS=""; } { print """,$0,""n"; } I assume, that it should be: "aaa" "bbb" "ccc" shouldn't it? Nevertheless, what I get is: "aaa" "bbb" "cc" i.e. the last "c" is mysteriously trimmed. Letting RS="" solves this issue, nevertheless I would like to understand, why the RS="nn+" version doesn't work. By the way, BINMODE is set to 0, so I presume, that the "rn" sequence is converted internally to "n". Any suggestions? Thanks in advance, Mira |