For Programmers: Free Programming Magazines  


Home > Archive > AWK > September 2004 > Re: print 3 lines without newline









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: print 3 lines without newline
moggces

2004-09-28, 3:56 am

Ekkard Gerlach <egerlach@aiai.de> wrote in message news:<slrncl53aj.iov.egerlach@rex2.linuxburg.de>...
> I want to print three lines without newsline:
>
>
> file:
>
> ----
> aaaa
> bbbb
> cccc
> ----
> dddd
> eeee
> ffff
> ----
> [...]
>
>
>
> I want:
> ----
> aaaa;bbbb;cccc
> ----
> dddd;eeee;ffff
> ----
> [...]
>
>
> How can I delete EOL? - I'm using linux.
>
> thx
> Ekkard


Maybe you could use this and manually add first blank line
awk 'BEGIN{ FS="\n"; RS=""} { print $1";"$2";"$3"\n"}' test1

Jui-hua
Sponsored Links







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

Copyright 2008 codecomments.com