Thursday, April 21, 2005

Converting Mac to unix line endings

I lost the script that I used to use to convert mac line endings (returns) to unix line endings (new lines), so I did a search on the web to see what scripts I could find.

There are a lot of implementations of this script. Some using perl, shell script or the flip program. The one that I like to use is an alias in my .bashrc. I found this at macosxhints.

alias mac2unix="perl -pi -e 's/rn?/n/g' "

No comments:

Post a Comment

Revolutionizing Air Quality Monitoring: How I Upgraded Our System with Mila Integration for Smart Home Automation

In this blog post , I explained how I set up an air quality monitoring system for our neighborhood. With this setup, we can keep an eye on t...