[opensource] Command line question

Drew Yates yates at cse.ohio-state.edu
Sun Jun 4 00:40:10 EDT 2006


>From a command prompt, how can I:

join together every 15 lines of a file.

that is, 15 newlines will be replaced by a space, then the 16th will be
skipped, then the next 15 newlines will be replaced... etc.

The furthest I've gotten is join the first 15 lines only using sed. Anyone
have the solution or some pointers how to solve this elegantly on the
command line? A bash script or little perl script would work, too.

thanks!

-Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.cse.ohio-state.edu/pipermail/opensource/attachments/20060604/35284d6a/attachment.html


More information about the Opensource mailing list