Problems with FreeBSD 6.0

Mike Meyer mwm-keyword-freebsdhackers.102a7e at mired.org
Thu Apr 13 03:20:42 UTC 2006


In <443DA28D.2040503 at freebsdbrasil.com.br>, Patrick Tracanelli <eksffa at freebsdbrasil.com.br> typed:
> Kris Kennaway wrote:
> > On Thu, Apr 13, 2006 at 02:48:51AM +0200, Stefan Sperling wrote:
> >>On Wed, Apr 12, 2006 at 07:22:27PM -0400, Kris Kennaway wrote:
> >>>On Wed, Apr 12, 2006 at 10:48:44PM +0000, gs_stoller at juno.com wrote:
> >>>>	I tried out  FreeBSD 6.0  (sorry, I copied just part or
> >>>> uname -a  and I got something like "LINUX  2.4.2 FreeBSD 6.0 -
> >>>>Release #0: Nov 3 09:36:13 UTC 2005  i686 i686 i386 GNU/LINUX")
> >>>
> >>>No you didn't, since no version of FreeBSD reports itself as LINUX
> >>>from uname.
> >>Unless uname is a Linux binary.
> > FreeBSD doesn't ship uname as a Linux binary either :-)
> Unless under Linux mode...

Which would also explains the rest of the behavior the OP saw. He's
getting bash instead of sh - because /bin/sh on Linux is bash. The two
really odd behaviors - a list of files and a question about the number
of possibilities - is bash file completion, which is triggered by the
tab character.

As for echo having standardized behavior, that's simply wishful
thinking.  SysV and BSD echo commands have different behaviors. POSIX
is SysV. Various shells builtin echos have have flags and/or shell
variables to control whether you get a variant of the SysV or BSD
behavior, and different defaults.

To get the behavior you want with the bash builtin echo, use:
	echo -e "a\tb"
Better yet, consider using the printf command instead of echo.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list