I've solved my own question. In gawk at least, one can delineate fields by what they contain as opposed to what they are separated by. So what one does is set the FPAT variable as this:
FPAT = "([^,]*)|(\"[^\"]*\")"; Then awk will recognise a field which looks like this "20,000" as a single field, not two fields. Sent with ProtonMail Secure Email. ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Saturday, July 24th, 2021 at 13:25, Tim Hume via gnucash-user <gnucash-user@gnucash.org> wrote: > Hi, > > I'm exporting my transactions as CSV for processing by another program (awk - > but that's not really relevant). Large numbers in the exported CSV have > commas in them, like this: > > "20,000" > > In theory the quotes protect the comma from being considered a separator. But > in practice it's hard to get regular expressions to recognise this. My > current solution is to export the transactions with ";" (semi-colon) > delimiters. But I would be interested in a way to prevent GnuCash putting > commas in large numbers. Not all countries use the comma to break up large > numbers. Some use spaces and other things. And I've seen the comma used as a > decimal separator in some cases. > > Is this behaviour baked into GnuCash ... or maybe I could change it with the > LC_ environment variables? > > Cheers, > > Tim Hume > > Sent with ProtonMail Secure Email. > > gnucash-user mailing list > > gnucash-user@gnucash.org > > To update your subscription preferences or to unsubscribe: > > https://lists.gnucash.org/mailman/listinfo/gnucash-user > > If you are using Nabble or Gmane, please see > https://wiki.gnucash.org/wiki/Mailing_Lists for more information. > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Please remember to CC this list on all your replies. > > You can do this by using Reply-To-List or Reply-All. _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.