Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • this replaced it with space and not new lines. Output: a b c Commented Mar 19, 2011 at 14:52
  • @simpatico: Ok - I 'see' the problem now, your example output wasn't formatted correctly. Commented Mar 19, 2011 at 15:01
  • @lain: this doens't work with \n . Did you try it? the \ disappears while the n is appended. a, b --> an b Commented Mar 19, 2011 at 17:57
  • @simpatico: I did test it and it works ok. Commented Mar 19, 2011 at 18:04
  • @Iain GNU sed and sed (some of which are strictly POSIX-compliant) need not necessarily be the same...And I am pretty sure the functionality you tested is guaranteed on GNU sed only. With the others, it may - or may not - work. Like playing poker. :-) Commented May 9, 2015 at 2:26