Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site unido.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!unido!berndmz From: berndmz@unido.UUCP (Zimmermann) Newsgroups: net.unix Subject: Joining Textlines containing "Key: Text." Message-ID: <429@unido.UUCP> Date: Thu, 7-Nov-85 09:36:15 EST Article-I.D.: unido.429 Posted: Thu Nov 7 09:36:15 1985 Date-Received: Sat, 9-Nov-85 05:44:49 EST Organization: University of Dortmund Lines: 15 I have a file where each line contains a keyword, a colon and text. The keyword would be a string not containing a colon and the file is sorted by key. I want to join lines with the same key so that the key and the colon appears only once and the text potions are concatenated somehow. key1 : textA key1 : textA key2 : textB \ key2 : textB textC textD key2 : textC ======\ key3 : textE textF key2 : textD ======/ key3 : textE / key3 : textF I think this problem isn't so exotic. E.g. it may occur when you generate makefiles automatically.