[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sed problem



Hi guys,

$ uname -sr; man sed | fgrep -C1 literal\ newline
OpenBSD 3.6
     2.   The escape sequence \n matches a newline character embedded in the
          pattern space.  You can't, however, use a literal newline character
          in an address or in the substitute command.
$ print 'a\nb\nc' | sed -e 's/\n//'
a
b
c

I would have expected, from the manpage, the output 'abc'.

Where is the bug, in sed or in the manpage?

TIA,
//mirabile
-- 
> [...] Echtzeit hat weniger mit "Speed"[...] zu tun, sondern damit, da_ der
> richtige Proze_ voraussagbar rechtzeitig sein Zeitscheibchen bekommt.
Wir haben uns[...] geeinigt, dass das verwendete Echtzeit-Betriebssystem[...]
weil selbst einfachste Operationen *echt* *Zeit* brauchen.	(aus d.a.s.r)



Visit your host, monkey.org