Re: style of assignment to variable changes command selection

2008-03-07 Thread Bob Proulx
Eric Blake wrote: > Doug McIlroy wrote: > | So there's a bug in the manual, which does not breathe a word about > | time being executed by the shell. And the shell covers its tracks, too: > > Like I said, there's a difference between a builtin (for example, > 'builtin' or 'exec') and a reserved w

Re: style of assignment to variable changes command selection

2008-03-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Re-adding the list - I am not the bash maintainer, so keeping the list in the loop is essential if you want any action taken. According to Doug McIlroy on 3/7/2008 9:12 PM: | Thank you for the prompt reply | |> The difference in behavior is because t

Re: style of assignment to variable changes command selection

2008-03-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Doug McIlroy on 3/7/2008 7:17 PM: | These two bash sequences are not equivalent. | My intuition and the bash man page tell me they should be the same. | | % export X=x; time --version; unset X | -bash: --version: command not found | |

style of assignment to variable changes command selection

2008-03-07 Thread Doug McIlroy
These two bash sequences are not equivalent. My intuition and the bash man page tell me they should be the same. % export X=x; time --version; unset X -bash: --version: command not found % unset X; X=x time --version GNU time 1.7 Behavior observed in: GNU bash, version 3.2.33(18)-relea

Re: Possible eval builtin speedup?

2008-03-07 Thread Jan Schampera
Nicolas Bonifas wrote: > Thanks for your answer. > >> I assume you know that the speed issues most likely come from the >> operating system's supporting functions like the fork() and exec*() >> family members? > > How does it explain the speed difference between "echo `dircolors`" > and "dircol

Re: Possible eval builtin speedup?

2008-03-07 Thread Andreas Schwab
"Nicolas Bonifas" <[EMAIL PROTECTED]> writes: > Bash starts slowly on my 600 Mhz computer (.62 seconds). I wanted to > understand why, and here is what I found: > > $ time eval `dircolors` This has nothing to do with eval, the command is underquoted. You are measuring the time it takes to apply

Re: Possible eval builtin speedup?

2008-03-07 Thread Nicolas Bonifas
Thanks for your answer. > I assume you know that the speed issues most likely come from the > operating system's supporting functions like the fork() and exec*() > family members? How does it explain the speed difference between "echo `dircolors`" and "dircolors" ?