Help with sed Syntax

John Ruschmeyer john at moncol.UUCP
Mon Oct 27 12:38:07 AEST 1986


In article <4785 at brl-smoke.ARPA> quilico at 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



More information about the Comp.unix mailing list