Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site ccvaxa Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!ccvaxa!preece From: preece@ccvaxa.UUCP Newsgroups: net.unix Subject: Re: Putting in newlines using sed Message-ID: <1900017@ccvaxa> Date: Mon, 18-Nov-85 12:07:00 EST Article-I.D.: ccvaxa.1900017 Posted: Mon Nov 18 12:07:00 1985 Date-Received: Wed, 20-Nov-85 00:40:53 EST References: <376@bcsaic.UUCP> Lines: 22 Nf-ID: #R:bcsaic.UUCP:376:ccvaxa:1900017:000:831 Nf-From: ccvaxa.UUCP!preece Nov 18 11:07:00 1985 > This is on BSD 4.2... I have a process putting out lines that look > something like this: > fjlkjf foo (a b c) jflkjf (jfkj) foo (x y a) fjjfj > I want to break up the line so that each "foo" followed by its > parenthesized list of arguments appears on a separate line. I don't > care what happens to the other "words;" they are eliminated in later > processing. /* Written 12:29 pm Nov 15, 1985 by michaelm@bcsaic.UUCP > in ccvaxa:net.unix */ ---------- You're just not quoting enough. The cshell is grabbing your quote character. The command sed 's/foo/\\^Jfoo/g' filename where '^J' is the actual control-J character, and filename is the name of your file (piping in will work fine). You could also put the command in a file, with just one backslash. -- scott preece gould/csd - urbana ihnp4!uiucdcs!ccvaxa!preece