Sujet : Re: "sed" question
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.awkDate : 09. Mar 2024, 21:07:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <usifh6$2gb9r$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 09.03.2024 17:52, Ed Morton wrote:
About 20 or so years ago we had a discussion in this NG (which I'm not
going to search for now) and, shockingly, a consensus was reached that
we should encourage people to always write:
'{$2="1-1"} 1'
I don't recall such a "consensus". If you want to avoid cryptic code
you'd rather write
'{$2="1-1"; print}'
Don't you think?
And of course add more measures in case the data is not as regular as
the sample data suggests. (See my other postings what may be defined
as data, line missing or spurious blanks in the data, comment lines
or empty lines that have to be preserved, etc.)
instead of:
$2="1-1"
Janis