[Top][All Lists]

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

Re: Command not found with builtins and variables

From: Greg Wooledge
Subject: Re: Command not found with builtins and variables
Date: Wed, 10 Oct 2018 11:17:19 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Oct 10, 2018 at 01:42:50PM +0200, address@hidden 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
environment of a command, and time how long that command takes, then
you write it like this:

time TEST=1 something that is not actually ls because ls does not use \$TEST

> TEST=1 cd
> Works without any problems,

Completely useless.  cd does not use environment variables.

Stop OBFUSCATING your questions.

Post the ACTUAL QUESTIONS with the ACTUAL INTENT so we can answer them.

reply via email to

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