bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

$0 reconstructed with separator OFS - instead of FS - upon change of a f


From: Jannick
Subject: $0 reconstructed with separator OFS - instead of FS - upon change of a field
Date: Sun, 19 Jan 2025 20:05:20 +0100

$0 is reconstructed when one of the fields ($i) is changed, however
recomposed with OFS instead of FS as separator. This is unexpected and
happens only when FS and OFS are different, of course. I guess this is a
bug.

A tiny example below. Expected output would be 'A:b'.

Thanks
J.

================
$ gawk --version | head -n 1
GNU Awk 5.3.1, API 4.0, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)

$ echo a:b | LC_ALL=C gawk 'BEGIN{ FS=":"; } {print; $1="A"; print;}'
a:b
A b




reply via email to

[Prev in Thread] Current Thread [Next in Thread]