Comma separated list to .csv for Apple Mail import

A handy command for turning a comma-separated list into a standard .csv file. I used this to convert old Eudora contacts files into a format that Apple’s Mail could import.

cat input.txt | tr ‘,’ ‘\012′ |sed s/^/,,/ > output.csv

I believe I had to add a line at the top of each file after conversion to tell Mail what it was I was importing:

First,Last,Email (other)

One Response to “Comma separated list to .csv for Apple Mail import”

  1. Anonymous Coward Says:

    Brandon,

    Great blog. You seem very knowledgeable about open source. I have a question: do you know what “compat” packages are? For example, in Fedora Core 2 there are these two packages:

    1. gcc-c++
    2. compat-gcc-c++

    But what is the difference? I have seen that word compat appear in other places but never understood what it meant. Compatible with what? Compatriot of whose?

    Thanks.

Leave a Reply