Date: Tue, 3 Jun 2003 15:42:25 +0100 From: Tony Finch <dot@dotat.at> To: freebsd-standards@freebsd.org Subject: Sed substitution bugs Message-ID: <20030603144225.GH18938@chiark.greenend.org.uk>
next in thread | raw e-mail | index | archive | help
$ echo foo | sed 's/ */,/g' ,f,o,o $ On Solaris and Linux I get ,f,o,o, (which is what I expected). The following work correctly: $ echo | sed 's/ */,/g' , $ echo foo | sed 's/ *$/,/g' foo, $ Here's another (related) bug: $ echo foo | sed 's/ */,/1' ,foo $ echo foo | sed 's/ */,/2' ,foo $ echo foo | sed 's/ */,/3' ,foo $ echo foo | sed 's/ */,/4' ,foo $ echo foo | sed 's/ */,/5' ,foo $ Tony. -- f.a.n.finch <dot@dotat.at> http://dotat.at/ LUNDY FASTNET IRISH SEA: SOUTHEAST VEERING SOUTHWEST 5 TO 7, OCCASIONALLY GALE 8 AT FIRST, DECREASING 4 OR 5. RAIN. MODERATE OR GOOD.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030603144225.GH18938>