For Programmers: Free Programming Magazines  


Home > Archive > Unix Shell Programming > 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
Ed Morton

2006-09-21, 7:02 pm

hikums@gmail.com wrote:
> I need to merge line to previous line if line ends with anything other
> than " (double quote).
>
> This is on a huge file. Thanks much..
>
> Kums
>


awk '/"$/{print ""}{printf "%s",$0}END{print ""}' file

Ed.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com