Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 1999 17:38:21 -0800
From:      Ludwig Pummer <ludwigp@bigfoot.com>
To:        cjclark@home.com, freebsd-questions@FreeBSD.org (FreeBSD Questions)
Subject:   Re: sed and newlines
Message-ID:  <4.1.19990317173532.00a4cee0@mail-r>
In-Reply-To: <199903172339.SAA06674@cc942873-a.ewndsr1.nj.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 03:39 PM 3/17/99 , Crist J. Clark wrote:
...
>If I am reading this correctly,
>
>% sed 's/\n/   /' file
>
>Should take the file and subsitute three spaces in place of every
>newline. However, it does not. It does not seem to understand '\n.'
...
>Am I missing something obvious? Or is sed broken?

Have you tried escaping your \ ? As in
sed 's/\\n/   /' file

When I've had problems with escaping things I (1) used echo in place of the
command to see what the shell did to the command line I was giving (2)
changed my shell's globbing options (read the manpage for your shell on that).

--Ludwig Pummer ( ludwigp@bigfoot.com ) ICQ UIN: 692441


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.1.19990317173532.00a4cee0>