help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Why time does not take environment variable?


From: Chet Ramey
Subject: Re: [Help-bash] Why time does not take environment variable?
Date: Mon, 26 Nov 2018 14:25:20 -0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 11/26/18 12:18 PM, Peng Yu wrote:

> It seems that `time` is special in the aspect of whether an inline
> environment variable can be set or not. Is it documented somewhere in
> the manual? Thanks.

You're looking at it the wrong way.

The bash manual documents `time' as a reserved word. Reserved words are not
documented as being able to be prefixed with assignment statements -- they
are not recognized as reserved words unless they are the first word in a
simple command. If they have to be the first word, there can be no words,
like assignment statements, preceding them.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]