Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  

If a 'train station' is where a train stops, what's a 'workstation'?


programming / comp.lang.awk / latest

Handling DOS (Windows) text files in Unix (Linux) - a nifty extension lib.

comp.lang.awk

Posted: 16 Hours 57 Minutes ago by: Kenny McCormack

A frequent task of mine is to write GAWK scripts that process files created by Windows users. Naturally, I prefer to work/develop on Linux, while they are creating/editing the files on Windows. I access their files via a Samba share. Th

Re: ATTN: GAWK developers. I need help with writing an input filter

comp.lang.awk

Posted: 3 Days 6 Hours ago by: Kenny McCormack

Thank you. That makes a lot of sense. Now, as it happens, it turns out I made a boo-boo here. My underlying assumption about what was needed to be implemented was all wrong. Upon digging into things a bit deeper, I realized that the f

Re: ATTN: GAWK developers. I need help with writing an input filter

comp.lang.awk

Posted: 3 Days 8 Hours ago by: Bruce Horrocks

You don't need to call fdopen() every time, if I understand this page correctly: <https://www.gnu.org/software/gawk/manual/html_node/Input-Parsers.html> I think you need only call it when your XXX_can_take_file() function is invoked an

Re: ATTN: GAWK developers. I need help with writing an input filter extension.

comp.lang.awk

Posted: 3 Days 13 Hours ago by: Spiros Bousbouras

[...] Isn't it trivial to write your own getline() with the interface you want ? [...] I don't know what your overall set up is and what function calls what when but you can specify your own buffer using setvbuf() .This way you ca

ATTN: GAWK developers. I need help with writing an input filter extension.

comp.lang.awk

Posted: 3 Days 17 Hours ago by: Kenny McCormack

First, note that I have already written one. It provides "readline"-like capability to GAWK. It uses a package which is similar to, but different from, "readline", so that you have a scrollback buffer when you are entering lines at the t

Re: repeating the last record after meeting a condtion

comp.lang.awk

Posted: 12 Days 17 Hours ago by: Kenny McCormack

Others have given solutions using flag variables and such, that are designed to work regardless of file size, but here's the way I'd look at this problem. I'd assume that the file size isn't an issue - i.e., that your file is probably no

Re: repeating the last record after meeting a condtion

comp.lang.awk

Posted: 12 Days 18 Hours ago by: raj

Thank you very much

Re: repeating the last record after meeting a condtion

comp.lang.awk

Posted: 12 Days 18 Hours ago by: Janis Papanagnou

Maybe something like this... awk -F, 'p && $1!=p {print d}; {p=$1; d=$0 }; 1; END{print d}' Janis

Re: repeating the last record after meeting a condtion

comp.lang.awk

Posted: 12 Days 18 Hours ago by: Ed Morton

$ awk -F',' ' p1 != $1 { if (NR>1) print p0 } { print; p1=$1; p0=$0 } END { print p0 } ' file 660312,MIKE , 138555.51 660312,MIKE , 219132.05 660312,MIKE , 246677.63 660312,MIKE , 268489.41 >>>>this record to be repeat

repeating the last record after meeting a condtion

comp.lang.awk

Posted: 12 Days 19 Hours ago by: raj

Hi, I have this sample file: 660312,MIKE , 138555.51 660312,MIKE , 219132.05 660312,MIKE , 246677.63 660312,MIKE , 268489.41 >>>>this record to be repeated 670182,JOHN , 155591.30 670182,JOHN , 246753.39 670182,JOHN , 279279.87 67

GNU Awk bulk load of file (manual references) (was Re: Convert CR LF

comp.lang.awk

Posted: 19 Days 1 Hour ago by: Janis Papanagnou

You are right, the focus got shifted. And also the subject needs an adjustment (in CUS and CLA; which I've done here for comp.lang.awk). Janis

Re: Convert CR LF to CR

comp.lang.awk

Posted: 19 Days 9 Hours ago by: Spiros Bousbouras

[On AWK dark corners.] The only person who can provide authoritative answers is Arnold Robbins. I think he reads comp.lang.awk but I'm not sure if he reads comp.unix.shell so you should have crossposted to comp.lang.awk (which I've d

Gawk mailing list changes

comp.lang.awk

Posted: 29 Days 22 Hours ago by: Aharon Robbins

Hello All. Effective immediately, there are changes in the gawk mailing lists. 1. bug-gawk@gnu.org should be used O N L Y for bug reports. Discussion and "why" and "why is gawk different" etc questions should no longer go to this list.

13 recent articles found.

rocksolid light 0.7.0
clearneti2ptor