I know if sed
is GNU version, version check can be done like
$ sed --version
But this doesn't work in OS X. How can I do that?
I know if sed
is GNU version, version check can be done like
$ sed --version
But this doesn't work in OS X. How can I do that?
Looking though the various version of
sed
intext_cmds
there are not many changes.10.0.0
Used NetBSDsed
from fall 199810.3.0
Used FreeBSDsed
from fall 2002 but left the man-page unchanged, adding-E
extended regular expressions and-i
in-place editing.10.4.0
Had some fixes for in-place editing, and changed the man-page to the FreeBSD man-page from fall 2004.10.5.0
Updated to FreeBSD sed from fall 2005, adding-l
line-buffered output and more refinements/fixes to in-place editing.10.6.0
Added a reference tocompat(5)
in the man-page.The version of the operating-system can be checked, instead of the
sed
utility, by either usinguname -r
orsw_vers -productversion
:(BSD utilities are not versioned because they are considered part of their operating-system)
This probably isn't the answer you're looking for, but you can't. Mac OS X
sed
has no option to show the version number.There is not even a version number in the binary: