Removing newlines (n) with sed

Today I had to search again on how to remove newline special characters with sed. Thanks to Kamil over at linux.dsplabs.com.au, I found it again rather quickly. Now, this is just for my own safekeeping, so I don’t end up googling for it again … 🤷 1 echo -e "Line containing nnewlines!" | sed ':a;N;$!ba;s/n//g'

June 24, 2008 · 1 min · 55 words · christian

Praise teh sed

Since my talk with Robin on Thursday regarding the autogenerated userinfo.xml, I finally found some time today to get all the info’s I need out of userinfo.xml. Since I don’t really want to manually enter all those mail addresses from userinfo into LDAP manually, I figured sed might be my best friend. BUT sed ain’t easy .. But thanks to Fabian and Gilles, I learned something new about sed today .. Basically I searched for a way to transform userinfo.xml into a datafile for ldapedit. ...

August 6, 2007 · 2 min · 232 words · christian