4 ms·
This is the biggest win IME. You have a (usually) portable transport format that can get the information into and out of an enormous variety of tools that do n
by anymouse123456 3y ago
This is the biggest win IME.
You have a (usually) portable transport format that can get the information into and out of an enormous variety of tools that do not necessarily require a software engineer in the middle.
I'm also struggling with such a quick dismissal of human readable formats. It's a huge feature.
What happens when there's a problem with a single CSV file in some pipeline that's been happily running fine for years? You can edit the thing and move on with your day. If the format isn't human readable, now you may have to make and push a software update to handle it.
Of course, CSV is a terrible format that can be horribly painful. No argument there.
But despite the pain, it's still far better than many alternatives. In many situations.
- chasil 3y agoIn a POSIX shell, I actually prefer to use the bell character for IFS. while IFS="$(printf \\a)" read -r field1 field2... do ... done This works just as well as anything outside the range of printing characters. Getting records that contain newlines would be a bit trickier.
- BenjiWiebe 3y agoI think IFS=$'\a' works too.
- thristian 3y agoOnly in bash and possibly other shells that extend the POSIX syntax, not in the basic POSIX standard.
- chasil 3y agoI seem to remember something about dash adding that functionality. ...I found it - the question is under review by the Austin group for inclusion in POSIX. https://austingroupbugs.net/view.php?id=249 https://austingroupbugs.net/view.php?id=249
- quesera 3y agoHeaven help you if you cat the file in a shell, though!