bug-datamash
[Top][All Lists]
Advanced

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

getnum leaks into next field


From: mousefad
Subject: getnum leaks into next field
Date: Fri, 22 Nov 2024 12:32:48 +0000

Hi, 

I love datamash - thanks for the amazing tool!  I think I found a bug in datamash v1.8-dirty.

The `getnum` operation appears to go beyond the specified field:

$ cat data
ADDRESS|BILL_DATE
123 Letsbe Avenue, Madeupville|2024-10-01
The Post House, Hamleton|2024-10-14

$ datamash -t "|" -H getnum 1 cut 2 < data
getnum(ADDRESS)|cut(BILL_DATE)
123|2024-10-01
2024|2024-10-14

I feel like it should not take the numerical value from the following field, but it appears to be doing so when no number if found in the specified field.

Thanks!

reply via email to

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