Results 1 to 5 of 5

Thread: echo command

Hybrid View

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    4

    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

  2. #2
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205

    Re: echo command

    Quote 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

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Posts
    4

    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.

  4. #4
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205

    Re: echo command

    Quote 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.

  5. #5
    Senior Member registered user
    Join Date
    Apr 2005
    Location
    italy
    Posts
    245
    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

  1. help with the ln command
    By Tuxgrrrl in forum General Support
    Replies: 5
    Last Post: 02-08-2007, 10:32 AM
  2. Using Man[command]
    By DigidocTN in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 05-16-2006, 07:04 AM
  3. bootfrom command with 4.0 DVD
    By darkstarr in forum General Support
    Replies: 0
    Last Post: 06-29-2005, 08:29 PM
  4. Which command is the right one?
    By darkwid in forum Hdd Install / Debian / Apt
    Replies: 4
    Last Post: 04-01-2004, 11:07 PM
  5. what is this? echo "0x100" > /proc/sys/kernel/r
    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
  •  


(New) AMD Ryzen 7 5700X 8 Core 16 Thread AM4 Unlocked 3.4 GHz CPU OEM Tray picture

(New) AMD Ryzen 7 5700X 8 Core 16 Thread AM4 Unlocked 3.4 GHz CPU OEM Tray

$169.99



AMD Ryzen 7 7800X3D 8-Core 16-Thread 4.2GHz/5.0GHz Socket AM5 picture

AMD Ryzen 7 7800X3D 8-Core 16-Thread 4.2GHz/5.0GHz Socket AM5

$275.00



8-core 10-core GPU baseboard 8654 to PCIE 5.0x16 GPU expansion baseboard picture

8-core 10-core GPU baseboard 8654 to PCIE 5.0x16 GPU expansion baseboard

$377.77



Lenovo ThinkCentre M920S Sff Intel Core i5 8600 8GB 256GB SSD Windows 11 Pro picture

Lenovo ThinkCentre M920S Sff Intel Core i5 8600 8GB 256GB SSD Windows 11 Pro

$94.99



AMD Ryzen 7 9800X3D 8-Core AM5 CPU 4.7GHz 96MB L3 8MB L2 100MHz picture

AMD Ryzen 7 9800X3D 8-Core AM5 CPU 4.7GHz 96MB L3 8MB L2 100MHz

$389.99



Intel Core i9-9900K Coffee Lake 8-Core, 16-Thread, 3.6 GHz (LGA 1151) picture

Intel Core i9-9900K Coffee Lake 8-Core, 16-Thread, 3.6 GHz (LGA 1151)

$189.99



AMD Ryzen 7 8700G 8-Core 16-Thread Radeon 780M LGA 1718 4.2GHz Desktop Processor picture

AMD Ryzen 7 8700G 8-Core 16-Thread Radeon 780M LGA 1718 4.2GHz Desktop Processor

$199.97



Lenovo LOQ 15 15.6

Lenovo LOQ 15 15.6" FHD 144Hz 8-Core i5-12450HX 16GB 512GB SSD GeForce RTX 4050

$799.00



Apple MacBook Air 13.6” M2 8GB 256GB SSD 2022 MLY33LL/A 8‑Core CPU 8‑Core GPU picture

Apple MacBook Air 13.6” M2 8GB 256GB SSD 2022 MLY33LL/A 8‑Core CPU 8‑Core GPU

$529.95



Dell Inspiron 15 3511 8GB RAM 256GB SSD Intel Core i5-1135G7@2.40 Windows Laptop picture

Dell Inspiron 15 3511 8GB RAM 256GB SSD Intel Core [email protected] Windows Laptop

$187.00