News for hackers. Stuff that matters.
Re:GNU sed 4.2.2 released, maintainer resigns by bonzini on Sunday December 23, 2012 @04:56AM (#4959099)
Just as an example of extending sed, I introduced "sed -i".

Yes, it doesn't require much maintenance, but sometimes you can be surprised. I started maintaining GNU grep 3 years ago because it was in a really sorry state. Some parts were almost rewritten to make it faster and more correct.

Re:GNU sed 4.2.2 released, maintainer resigns by ohnoohno on Sunday December 23, 2012 @01:42PM (#4960188)
I never use sed -i because I can't rely on that being a standard feature as I move from system to system. With a utility as basic as sed that is found on almost every UNIX (and hence often used in a system's startup or configuration scripts, etc.), I want my own sed scripts to work consistently across all systems I might use.

If I really want to create temp files I can use ed or use sed with shell redirection. Were it for some reason a requirement, I can avoid temp files, at least for the substitution (s) command, as follows:

  sed -a '"$1"';H;$!d;g;w'$2
  where $1 is some sed s commands and $2 is a file
This is not "perfect" as there will blank lines, but it does the job without temp files (if that were really a concern).

If GNU grep was in need of repair and you fixed it, then I thank you. But I'm not clear on how that justifies any "extensions" to GNU grep.

Maintenance, at least to me, means fixing things, not extending them and adding more complexity and things that can potentially break or create incompatibilities across different UNIX's.

Re:GNU sed 4.2.2 released, maintainer resigns by kroger on Sunday December 23, 2012 @09:24PM (#4961577)
Both GNU sed and BSD sed have -i, what other kinds of sed are you using?
Re:GNU sed 4.2.2 released, maintainer resigns by wzm on Monday December 24, 2012 @08:31PM (#4964738)
/usr/bin/sed on Solaris 10 and earlier does not support -i. I don't know if OpenIndiana / Solaris 11's sed support -i, but OmniOS uses gnu sed by default, so OI might also.

As I recall, AIX's default sed also does not support -i, but I no longer have access to AIX systems to test against.

Re:GNU sed 4.2.2 released, maintainer resigns by kroger on Tuesday December 25, 2012 @07:07PM (#4967555)
Honestly, sed -i is so useful that I'd file a feature request if a sed didn't support it.
Re:GNU sed 4.2.2 released, maintainer resigns by mitchty on Wednesday December 26, 2012 @03:55AM (#4968660)
Its easier to just not use sed and use perl -pie instead. Ironically its much more portable to non gnu systems.