-
echo command
I tried
1) echo --help and
2) echo --version
but they doesn't seem to work. I am using version 5.0.3 of knoppix
-
Senior Member
registered user
Re: echo command

Originally Posted by
Lerner
I tried
1) echo --help and
2) echo --version
but they doesn't seem to work. I am using version 5.0.3 of knoppix
(I'm using Knoppix 4.0.2, but this is likely same in your Knoppix also)
The "problem" is that there are 2 different versions of "echo":
1. The one provided internally by bash-shell
2. The one located at /bin/echo
First one is used by default when you just use echo on bash command-line, and is documented at man bash-builtins. This one doesn't support --help or --version.
The second one is documented at man echo and does support --help and --version.
Code:
knoppix@0[knoppix]$ echo --version
--version
knoppix@0[knoppix]$ /bin/echo --version
echo (GNU coreutils) 5.2.1
Written by FIXME unknown.
Copyright (C) 2004 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.
There are also few other differences, like support for hexadecimal escapes:
Code:
knoppix@1[knoppix]$ echo -e "\x41\x42\x43"
ABC
knoppix@1[knoppix]$ /bin/echo -e "\x41\x42\x43"
\x41\x42\x43
-
Re: echo command
Thanks
There are also few other differences, like support for hexadecimal escapes:
Code:
knoppix@1[knoppix]$ echo -e "\x41\x42\x43"
ABC
knoppix@1[knoppix]$ /bin/echo -e "\x41\x42\x43"
\x41\x42\x43
In both the above cases output was ABC.
-
Senior Member
registered user
Re: echo command

Originally Posted by
Lerner
Thanks
There are also few other differences, like support for hexadecimal escapes:
Code:
knoppix@1[knoppix]$ echo -e "\x41\x42\x43"
ABC
knoppix@1[knoppix]$ /bin/echo -e "\x41\x42\x43"
\x41\x42\x43
In both the above cases output was ABC.
You might have newer version of /bin/echo than I do, which supports this.
-
Senior Member
registered user
For a complete list of bash-built-in-commands just type 'help'.
To get a help page about a built-in-bash-command type 'help command', in this case 'help echo'.
Similar Threads
-
By Tuxgrrrl in forum General Support
Replies: 5
Last Post: 02-08-2007, 10:32 AM
-
By DigidocTN in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 05-16-2006, 07:04 AM
-
By darkstarr in forum General Support
Replies: 0
Last Post: 06-29-2005, 08:29 PM
-
By darkwid in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 04-01-2004, 11:07 PM
-
By tealeaf in forum General Support
Replies: 3
Last Post: 11-06-2003, 08:25 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

NEW Kingston 8GB DDR4 2666MHz Desktop RAM KCP426NS8/8 PC4-21300
$26.00

DDR4 Laptop RAM 4GB 8GB 16GB 32GB 2400 2666 3200 Samsung Hynix
$66.00

RAMAXEL Lenovo 32GB LPDDR5X CAMM2 7500MHz Laptop RAM | UNTESTED
$445.00

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$21.68

Crucial DDR3L 16GB 2 x 8GB 1600 MHz PC3L-12800 Laptop RAM Sodimm Memory 1.35V
$41.00

Major Brand 16GB (2x8GB) PC3-12800U DDR3-1600MHz DDR3-12800 DESKTOP RAM NON-ECC
$29.99

LOT OF 10 - SK hynix 16GB DDR4 3200AA HMAA2GS6CJR8N-XN 1Rx8 PC Laptop Memory RAM
$649.00

G.Skill Ripjaws V F4-3200C16D-16GVKB 16GB (2x8GB) DDR4 Desktop RAM 3200MHz
$64.99

Kingston RAM 1GB PC2-3200 DDR2 SDRAM 200-Pin SO-DIMM KVR400D2S3/1G (LOT OF 5)
$45.00

Kingston 2GB Kit (2x1GB) DDR2 PC2-4200 DDR2-533 240-Pin DIMM Non-ECC (LOT OF 2)
$45.00