I’m working with some CSV text data today. Tweets actually. People seem to think it’s a good idea to put hard returns into their tweets, which makes my life difficult when importing then from text files into something useful like COSMOS 🙂
Lines usually start with a
" character and this snippet will remove any lines that do not, and bring them all onto one line…making a well formatted row in the CSV file and keeping COSMOS (and me) happy.
Find and replace (with single space character) using grep in TextWrangler. Job done.