Re: Problems with FreeBSD 6.0
Здравствуйте, gs. Вы писали 13 апреля 2006 г., 2:48:44: gjc I tried out FreeBSD 6.0 (sorry, I copied just part or gjc uname -a and I got something like LINUX 2.4.2 FreeBSD 6.0 - gjc Release #0: Nov 3 09:36:13 UTC 2005 i686 i686 i386 GNU/LINUX) gjc and was surprised to find that things in the echo command didn't gjc work. When I typed gjc echoa\tb gjc I got a\tb , no tab replacing the \t Same for \n. gjc When I tried to type gjc echotabb gjc where tab stands for hitting the tab key, when I hit tab the gjc first time, nothing happened, when I hit it immediately afterward, I gjc got an ls -A listing. I did manage to get a tab into the string [skipped] ok. If you want to print out tab you must to use sequence ^V^I. Where ^I is tab char. Or you may use tab-key instead of ^I. That there's the same. Or I something didn't understand? -- С уважением, Vyacheslav mailto:[EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problems with FreeBSD 6.0
Hi, I haven't really been following this thread, and I'm not sure if this has been posted here already. Appologies if this has been already. To usually get a tab to be echoed, you can use echo -e a\tb Cheers, Ryan On Thu, 13 Apr 2006, Vyacheslav Anikin wrote: Здравствуйте, gs. Вы писали 13 апреля 2006 г., 2:48:44: gjc I tried out FreeBSD 6.0 (sorry, I copied just part or gjc uname -a and I got something like LINUX 2.4.2 FreeBSD 6.0 - gjc Release #0: Nov 3 09:36:13 UTC 2005 i686 i686 i386 GNU/LINUX) gjc and was surprised to find that things in the echo command didn't gjc work. When I typed gjc echoa\tb gjc I got a\tb , no tab replacing the \t Same for \n. gjc When I tried to type gjc echotabb gjc where tab stands for hitting the tab key, when I hit tab the gjc first time, nothing happened, when I hit it immediately afterward, I gjc got an ls -A listing. I did manage to get a tab into the string [skipped] ok. If you want to print out tab you must to use sequence ^V^I. Where ^I is tab char. Or you may use tab-key instead of ^I. That there's the same. Or I something didn't understand? -- С уважением, Vyacheslav mailto:[EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problems with FreeBSD 6.0
In the last episode (Apr 13), Ryan Maclear said: I haven't really been following this thread, and I'm not sure if this has been posted here already. Appologies if this has been already. To usually get a tab to be echoed, you can use echo -e a\tb The echo command doesn't take a -e option. Your shell's echo builtin may or may not, but for portability, you have to assume it doesn't. Use the printf command if you want fancy formatting. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problems with FreeBSD 6.0
On Wed, Apr 12, 2006 at 10:48:44PM +, [EMAIL PROTECTED] 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. Kris pgpXhGsIeFy6A.pgp Description: PGP signature
Re: Problems with FreeBSD 6.0
On Wed, Apr 12, 2006 at 07:22:27PM -0400, Kris Kennaway wrote: On Wed, Apr 12, 2006 at 10:48:44PM +, [EMAIL PROTECTED] 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. -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problems with FreeBSD 6.0
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 +, [EMAIL PROTECTED] 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 :-) Kris pgpZaxflbVezT.pgp Description: PGP signature
Re: Problems with FreeBSD 6.0
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 +, [EMAIL PROTECTED] 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 :-) Kris /compat/linux/bin/uname -a Linux karma.internal 2.4.2 FreeBSD 6.1-PRERELEASE #0: Tue Apr 4 22:24:50 EST 2006 i686 i686 i386 GNU/Linux -- Tony Maher Data Grid Specialist email: [EMAIL PROTECTED] Computational Research Support Unit phone: +61 2 9514 2265 Department of Mathematical Sciencesfax: +61 2 9514 2248 University of Technology, Sydney PO Box 123 Broadway NSW 2007 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problems with FreeBSD 6.0
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 +, [EMAIL PROTECTED] 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 :-) Kris Unless under Linux mode... # /compat/linux/bin/uname -a Linux claire.freebsdbrasil.com.br 2.4.2 FreeBSD 7.0-CURRENT #15: Wed Apr 12 13:23:25 BRST 2006 i686 i686 i386 GNU/Linux # chroot /compat/linux /bin/bash bash-2.05b# uname -a Linux claire.freebsdbrasil.com.br 2.4.2 FreeBSD 7.0-CURRENT #15: Wed Apr 12 13:23:25 BRST 2006 i686 i686 i386 GNU/Linux -- Patrick Tracanelli FreeBSD Brasil LTDA. (31) 3281-9633 / 3281-3547 [EMAIL PROTECTED] http://www.freebsdbrasil.com.br Long live Hanin Elias, Kim Deal! ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problems with FreeBSD 6.0
On Thu, Apr 13, 2006 at 10:57:48AM +1000, Tony Maher wrote: 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 +, [EMAIL PROTECTED] 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 :-) Kris /compat/linux/bin/uname -a Linux karma.internal 2.4.2 FreeBSD 6.1-PRERELEASE #0: Tue Apr 4 22:24:50 EST 2006 i686 i686 i386 GNU/Linux Right, and that's not the FreeBSD uname, it's the redhat (or whatever) uname. Kris pgpuyPskxSkpo.pgp Description: PGP signature
Re: Problems with FreeBSD 6.0
In [EMAIL PROTECTED], Patrick Tracanelli [EMAIL PROTECTED] 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 +, [EMAIL PROTECTED] 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 [EMAIL PROTECTED] http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]