Unix Shell - Re: merge line to previous line if ends with anything other than

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > September 2006 > Re: merge line to previous line if ends with anything other than





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: merge line to previous line if ends with anything other than
Michael Tosch

2006-09-22, 7:28 pm

hikums@gmail.com wrote:[vbcol=seagreen]
> figured out myself:
>
> sed -e '/[A-Za-z0-9 ]$/{N;s/\n//g;}' inp_file >out_file
>
> Thanks...
> hikums@gmail.com wrote:

sed -e '/[^"]$/{N;s/\n//g;}' inp_file >out_file

--
Michael Tosch @ hp : com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com