[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Help with sed script!



> Hi
>
> I like sed but the easiest way might be to open in gvim and do a
> search and replace of \n for nothing.
>

Hi

I had a few minutes so:

sed '/^$/d' filename

will remove the blank lines (all blank lines in the file).  If you are
particular (only the ones after member) you need

cat filename | perl -lp0e 's/DC=LO\n.*CAL/DC=LOCAL\n/g'

will combine the lines (if the break is at LO)

sed operates only on one line at a lime.  Perl in paragraph mode can
combine the lines...

tim


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]