Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



In 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.


Heaven help you if you cat the file in a shell, though!


I think IFS=$'\a' works too.


Only in bash and possibly other shells that extend the POSIX syntax, not in the basic POSIX standard.


I 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: