[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: inconstancy with RS = "(\r?\n){2}"
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: Fwd: inconstancy with RS = "(\r?\n){2}" |
Date: |
Mon, 26 Jul 2021 18:27:06 +0200 |
i will cause i have to RS = "" and FS = "\n"
and in another gawk strip the optional \r's away
On Mon, Jul 26, 2021, 17:01 Ed Morton <mortoneccc@comcast.net> wrote:
>
> On 7/26/2021 8:15 AM, Alex fxmbsw7 Ratchev wrote:
>
> ---------- Forwarded message ---------
> From: Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> <fxmbsw7@gmail.com>
> Date: Mon, Jul 26, 2021, 15:13
> Subject: Re: inconstancy with RS = "(\r?\n){2}"
> To: Aharon Robbins <arnold@skeeve.com> <arnold@skeeve.com>
>
>
> but the RS issue remains
> oh well up to better times somewhen else
> thanks :)
>
>
> Have you considered just writing code to decide if a pair of `\r?\n`s has
> been seen instead of using a more complicated RS? For example, using the
> default RS and ORS, I think this will do what you want:
>
> --------
> $ cat tst.awk
> $0 ~ /^\r?$/ {
> gotRS = 1
> lineNr = 0
> }
> !gotRS {
> # just keep appending to the record until the real RS is found
> rec = ( ++lineNr == 1 ? "" : rec ORS) $0
> next
> }
> {
> # we have a complete record so save it in $0 and process as normal
> gotRS = 0
> $0 = rec
> print "<" $0 ">"
> }
> --------
> $ awk -f tst.awk
> 1
> 2
>
> <1
> 2>
> 3
>
> <3>
> --------
>
> Regards,
>
> Ed.
>
>
>
> On Mon, Jul 26, 2021, 15:12 <arnold@skeeve.com> <arnold@skeeve.com> wrote:
>
>
> I'm sorry.
>
> I give up.
>
> You will have to use another approach. Maybe using gawk's built-in
> networking will help.
>
> Good luck.
>
> Arnold
>
> Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> <fxmbsw7@gmail.com> wrote:
>
>
> and no it doesnt work
> also on the stderr cmd i had to quit nc ( didnt try control d ) and then
> the rest appeared, on the tcpserv side, .. seems bug nothing done
> i fetched git clone new and did bootstrap and further
>
> On Mon, Jul 26, 2021, 15:07 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
> <fxmbsw7@gmail.com>
>
> wrote:
>
> i just got now to it
> in my testing on terminal still same bug, on testing that gawk > stderr
> cmd even more newlines were needed to make it print ( on the tcpserv
>
> term )
>
> that makes it invalid for my httpd and the bug but ill just try now too
>
> On Mon, Jul 26, 2021, 13:24 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
> <fxmbsw7@gmail.com>
> wrote:
>
>
> thank you big time ! ill just test now
> sorry for not knowing much git
>
> On Mon, Jul 26, 2021, 13:17 <arnold@skeeve.com> <arnold@skeeve.com> wrote:
>
>
> Please do
>
> make distclean
> git pull
> git checkout test-socket-patch
> ./bootstrap.sh && ./configure && make
>
> I applied the patch and pushed it to git in that branch.
>
> Arnold
>
>
>
>
- Re: inconstancy with RS = "(\r?\n){2}", (continued)
- Message not available
- Message not available
- Message not available
- Re: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Message not available
- Re: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Ed Morton, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}",
Alex fxmbsw7 Ratchev <=
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Ed Morton, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", Alex fxmbsw7 Ratchev, 2021/07/26
- Re: Fwd: inconstancy with RS = "(\r?\n){2}", arnold, 2021/07/27