zsh-users
 help / color / mirror / code / Atom feed
* time command with shell builtins
@ 2023-01-23 13:40 Dominik Vogt
  2023-01-23 13:42 ` Roman Perepelitsa
  0 siblings, 1 reply; 26+ messages in thread
From: Dominik Vogt @ 2023-01-23 13:40 UTC (permalink / raw)
  To: Zsh Users

The "time" command does not seem to work with builtin commands:

  $ which time
  time: shell reserved word

  # works
  $ time /bin/echo
  /bin/echo  0.00s user 0.00s system 61% cpu 0.002 total

  # doesn't work
  $ time echo
  # no output

Is it possible to get timing statistics of shell builtins too?
Timing "echo" isn't very interesting, but timing loop constructs
would be:

  $ time while foo; do bar done

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-02-02 19:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 13:40 time command with shell builtins Dominik Vogt
2023-01-23 13:42 ` Roman Perepelitsa
2023-01-23 14:17   ` zeurkous
2023-01-23 14:23     ` Roman Perepelitsa
2023-01-23 14:40       ` zeurkous
2023-01-23 14:28   ` Dominik Vogt
2023-01-23 14:46     ` zeurkous
2023-01-23 16:31     ` Bart Schaefer
2023-01-23 18:31     ` Mikael Magnusson
2023-01-23 18:49       ` Dominik Vogt
2023-01-24  9:32         ` Mikael Magnusson
2023-01-24 10:48           ` Dominik Vogt
2023-01-24 23:12             ` Dominik Vogt
2023-01-24 23:36               ` Bart Schaefer
     [not found]                 ` <Y9B7A8dWLiZNXKfW@localhost>
2023-01-26 16:23                   ` Dominik Vogt
2023-01-26 16:56                     ` Bart Schaefer
2023-01-26 17:26                       ` Dominik Vogt
2023-01-26 17:40                         ` Bart Schaefer
2023-02-02 18:10                     ` Dominik Vogt
2023-02-02 18:28                       ` Bart Schaefer
2023-02-02 19:15                         ` Dominik Vogt
2023-02-02 19:15                           ` Dominik Vogt
2023-02-02 19:31                           ` Bart Schaefer
2023-01-24 23:32             ` Bart Schaefer
2023-01-25  7:43               ` Mikael Magnusson
2023-01-25 12:58                 ` Dominik Vogt

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).