On 6/6/25 12:21 AM, Martin D Kealey wrote:
On Thu, 5 Jun 2025 at 20:22, Duncan Roe <[email protected]> wrote:On Wed, Jun 04, 2025 at 09:43:00AM -0400, Chet Ramey wrote:Is it useful to combine multiple selected fields (-f) into one space- separated field so `cut' can put the selected portions of each line into a corresponding array element?I'm inclined to think not. Because, what if a field itself contains spaces?If taking this approach, I would expect the fields to be recombined using the same separator as was used to split them apart, since fields cannot contain the field separator.
I think this is reasonable.
This would be consistent with what the “cut” utility does, and more useful for subsequent processing.
OK, how about this: the elements of the array, starting at 0, should be
exactly what `cut' would print to stdout if the array argument were not
supplied.
That seems more useful than the current behavior.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
