Skip to content

Greg's Teaching & Researchblog

Musings from the beautiful world of Atmospheric Chemistry

About me


I am a lecturer & researcher at Concordia University in Montreal, Canada. Teaching: Environmental, Analytical Chemistry & Advanced Data Analysis, Thermodynamics. Research interests: Method development, analysis & modelling of environmental data from source to sink. Data analysis employing machine learning algorithms in R and Python.
Territorial Acknowledgement

Pages

  • Research
  • Teaching
  • Publications
  • Community
  • Contact me

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Tag: text

Converting text files with sed

Sed is my friend to change fixed-width text files (e.g., from an R screen output) to a comma delimited file using

sed 's/ */,/g' file1 >file2.csv

Note the two spaces between s/ and */.

Posted on March 3, 2011Categories r, researchTags convert, file, r, screen, textLeave a comment on Converting text files with sed
Proudly powered by WordPress