Re: Command not found with builtins and variables

2018-10-11 Thread Chet Ramey
On 10/10/18 6:52 PM, Bob Proulx wrote: > Chet Ramey wrote: >> b...@feusi.co wrote: >>> The thing I noticed is that when setting a variable and then running the >>> command "time", bash reports "command not found". For example, the >>> command: >>> >>> TEST=1 time ls >>> >>> Results in "bash: time:

Re: Command not found with builtins and variables

2018-10-10 Thread Bob Proulx
Chet Ramey wrote: > b...@feusi.co wrote: > > The thing I noticed is that when setting a variable and then running the > > command "time", bash reports "command not found". For example, the > > command: > > > > TEST=1 time ls > > > > Results in "bash: time: command not found" That would work if y

Re: Command not found with builtins and variables

2018-10-10 Thread Chet Ramey
On 10/10/18 7:42 AM, b...@feusi.co wrote: > Hi, > I'm not exactly sure if the following is actually a bug or whether bash > is actually supposed to behave like this. However, I couldn't find any > documentation concerning it so I decided to ask. > > The thing I noticed is that when setting a varia

Re: Command not found with builtins and variables

2018-10-10 Thread Greg Wooledge
On Wed, Oct 10, 2018 at 01:42:50PM +0200, b...@feusi.co wrote: > TEST=1 time ls time is not a builtin. It's a "keyword". It's a piece of the shell's syntax. It has special magical rules that apply to nothing else. If you want to set an environment variable in the temporary execution environmen