Sujet : Re: printing words without newlines?
De : dchmelik (at) *nospam* gmail.com (David Chmelik)
Groupes : alt.comp.lang.awk comp.lang.awkDate : 13. May 2024, 03:04:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v1rsg2$37eqd$1@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.158 (Avdiivka; 6a11104e)
On Sun, 12 May 2024 12:11:27 -0000 (UTC), Kenny McCormack wrote:
Of course, the whole point of this thread is that none of us has any
idea what OP is talking about or what his actual problem is. We can
only guess...
Not the point. I stated I'm trying AWK... problem is in subject line.
Surprisingly, after rebooting PC, it all works now (un)commenting
particular parts (OSR or commenting out print and uncommenting printf).
On 12/05/2024 09:52, Bruce Horrocks wrote:
Let me re-phrase that: it would be better to set ORS in the BEGIN {}
section. I'm not sure why yours is not working but with some commented
out code and some not, your example is unclear.
Okay. What I posted works to read file, sort, print lines; I commented
out two versions that (initially) didn't work to print all on one line
(OSR or commenting out print and uncommenting printf). After rebooting
(maybe just needed to restart shell?) those worked as expected... with ORS
in BEGIN but alternatively in function I wrote. I guess as Mr McCormack
explained, one might have reasons to change OSR in different functions.