Using Sed to add a new line in Mac Terminal

This was driving me crazy until I hunted down the correct syntax. The following will replace a semicolon with a new line in Terminal for Mac

sed -e ‘s/;/\’$’\n/g’ /tmp/blah

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">