| « Total Commander for OpenSolaris? | Dillema... » |
Sed small reminder (in Russian)
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