[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fixed incomplete and incorrect treatment of comments and tra
From: |
Dima Kogan |
Subject: |
Re: [PATCH] Fixed incomplete and incorrect treatment of comments and trailing whitespace |
Date: |
Thu, 19 May 2022 23:47:44 -0700 |
User-agent: |
mu4e 1.6.10; emacs 29.0.50 |
Erik Auerswald <auerswal@unix-ag.uni-kl.de> writes:
> From a quick glance at the code diff in the link, this seems to allow
> comments inside a field, e.g., with datamash -H -C -t',' and the
> following input:
>
> # the next line is the header line
> one,two,three
> # the following line is the data line
> 1,2#this is the 2nd field,3
>
> in the data line the string "#this is the 2nd field" would be skipped,
> and the data line would have three fields with values 1, 2, and 3.
>
> Is that correct (I did not test it)? Is that the intended
> functionality?
I haven't tested this yet, but that wasn't my intent. Comments should do
what they do in perl and python and awk and everywhere else, so the last
line should be interpreted as "1,2". I may have made a mistake in the
implementation.
> Would you like to extend the documentation with a description of how
> exactly comments are intended to work with -C, --skip-comments?
Sure, but let's agree on what we're doing first. It sounds like some
people want to do this differently, and some don't want to do it at all.
Re: [PATCH] Fixed incomplete and incorrect treatment of comments and trailing whitespace, Shawn Wagner, 2022/05/18
Re: [PATCH] Fixed incomplete and incorrect treatment of comments and trailing whitespace, Tim Rice, 2022/05/27
Re: [PATCH] Fixed incomplete and incorrect treatment of comments and trailing whitespace, Erik Auerswald, 2022/05/28
Re: [PATCH] Fixed incomplete and incorrect treatment of comments and trailing whitespace, Erik Auerswald, 2022/05/28
Re: [PATCH] Fixed incomplete and incorrect treatment of comments and trailing whitespace, Tim Rice, 2022/05/28