OK, achei. Isso agora faz sentido.
o comportamento é específico do Nexenta e explicado no link
GNU and not GNU
The default behavior of Nexenta is to prefer GNU utilities, which are installed in
/usr/bin
and/usr/sbin
and so on. The Sun versions of these utilities are installed in/usr/sun/bin
and/usr/sun/sbin
. Nexenta uses a trick to be able to switch between a GNU and a SUN personality: if the environment variable SUN_PERSONALITY is set to one, the search paths/usr/sun/bin
and/usr/sun/sbin
take preference, even if the user executes the commands explicitly by their absolute path, e.g./usr/bin/sed
. This ensures that Solaris-based scripts work in Nexenta without modifications. Nexenta also uses this functionality in its SVR4 package commands. They can be used to install native Solaris packages in SVR4 format, calling alien to convert the package on-the-fly to a Debian package.
Isso é feito em algum lugar na libc.
Então,
$ sed --version
GNU sed version 4.1.5
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
$ SUN_PERSONALITY=1 sed --version
sed: illegal option -- version
Assim, seu script iniciado a partir do Java deve ter o conjunto SUN_PERSONALITY.
Você pode desmarcar isso no seu script se quiser as ferramentas GNU.