[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A robust but concise way to read TSV header?
From: |
Jesse Hathaway |
Subject: |
Re: A robust but concise way to read TSV header? |
Date: |
Thu, 24 Jun 2021 09:39:09 -0500 |
On Thu, Jun 24, 2021 at 9:17 AM Peng Yu <pengyu.ut@gmail.com> wrote:
> The following won't work, as it removes empty fields.
Would using a CSV be an option rather than a TSV? If so you could use the
csv builtin:
$ enable -f /usr/lib/bash/csv csv
$ csv -a foo 'a,,b'
$ declare -p foo
declare -a foo=([0]="a" [1]="" [2]="b")