Re: [Help-bash] Simple echo is printing the wrong value
From:
DJ Mills
Subject:
Re: [Help-bash] Simple echo is printing the wrong value
Date:
Fri, 6 Apr 2012 18:37:00 -0400
On Thu, Apr 5, 2012 at 6:49 PM, Bob Proulx <address@hidden> wrote:
> Bill Gradwohl wrote:
>
> For example '[ ... ]' versus '[[ ... ]]'. Â That will be your first
> homework assignment. Â Which of those are external and which of those
> are external? Â Hint: Use of 'type -a' is useful to help with this.
> Does knowing this explain why one is doing word splitting, file
> globbing, and other parameter actions that need quoting to prevent
> while the other one doesn't?
>
> Bob
>
The term you're looking for in "type" output is actually "shell
keyword", not just "shell builtin". Keywords like if, case, and [[
actually change the way bash parses the line. Regular builtins do not,
they're treated just like any other command.