Welcome to Nik Maslov`s blog
« Total Commander for OpenSolaris?Dillema... »

Sed small reminder (in Russian)

Permalink 04/24/09 15:42, by Nik Maslov, Categories: Welcome

Today I was forced to export LDIF output to CSV file.

Too sad, I haven`t used my regex/sed skills for a while, so a lot was forgotten.
Nevertheless - I managed to make from this

Maxim Kavalera
mkavalera@google.com

to

mkavalera@google.com, Maxim Kavalera

with this:
sed -e '/^$/d' -e '$!N;s/\n/\, /' input_file > output_file

Regexp is Black Magic, truly...

Also - small reminder for Sed, in Russian. Thank you, SudoUser

Leave a comment »

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

Search

XML Feeds

StatCounter

multiblog

©2010 by Nik Maslov

Contact | Blog theme by Asevo | multiple blogs | webhosting