sed'ing out newlines

Chris Devers cdevers at pobox.com
Mon Dec 15 14:55:55 EST 2003


On Mon, 15 Dec 2003, Dan Barrett wrote:

> I'm trying to assemble a CLASSPATH variable by reading in a file and
> substituting out the newlines in favor of a colon and perhaps another
> variable.

It sounds like you're in simple shellscript territory, if that.

Something like this (Bourne syntax) --

   export CLASSPATH=`fmt -2000 /path/to/file`:$CLASSPATH

-- or similar may be able to get you most of the way there.

If that doesn't cut it, maybe you could send the list a sample of a file
or two, and what things you would like to have set for you.


-- 
Chris Devers



More information about the Discuss mailing list