Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!bellcore!ulysses!mhuxr!mhuxt!houxm!hjuxa!petsd!moncol!john From: john@moncol.UUCP (John Ruschmeyer) Newsgroups: net.unix Subject: Re: Help with sed Syntax Message-ID: <386@moncol.UUCP> Date: Sun, 26-Oct-86 21:38:07 EST Article-I.D.: moncol.386 Posted: Sun Oct 26 21:38:07 1986 Date-Received: Mon, 27-Oct-86 22:12:12 EST References: <4785@brl-smoke.ARPA> Reply-To: john@moncol.UUCP (John Ruschmeyer) Organization: Monmouth College, W. Long Branch, NJ 07764 Lines: 25 In article <4785@brl-smoke.ARPA> quilico@CECOM-2.arpa (Grace Quilico) writes: >I'm have been trying (unsuccessfully) to determine what the correct syntax >would be for sed to substitute a given expression with multiple newlines. >For example, someone from an IBM environment ftp'd a file to me (VAX UNIX >System 5.2.2) which is in an IBM printer format. Except for the first line >in the file, the beginning of each line in this file (it's over 4 megs) has >a leading space, followed by the printer control character (e.g., 1 for >top of page, 0 for double-space, - for triple-space, or a blank for space). >(The first line has a + in column 1, and a 1 in column 2, followed by the >data.) It seems to me that sed would be the utility to use to convert >these characters. Hmm.. except for the first line of the file, why not just lose the leading sapce in each line (something like sed 's/^ //') and run the remainder through 'asa'. -- Name: John Ruschmeyer US Mail: Monmouth College, W. Long Branch, NJ 07764 Phone: (201) 571-3451 UUCP: ...!vax135!petsd!moncol!john ...!princeton!moncol!john ...!pesnta!moncol!john This isn't a coronation- this is bad comedy. -Galvatron