Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
time command with shell builtins
- X-seq: zsh-users 28740
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: time command with shell builtins
- Date: Mon, 23 Jan 2023 14:40:23 +0100
- Archived-at: <https://zsh.org/users/28740>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- Reply-to: dominik.vogt@xxxxxx
- Ui-outboundreport: notjunk:1;M01:P0:3W4qwqECgWQ=;hVUuJqxEABjycgmVEUJfQU5AZzQ c7E1zoN5V9BmzIon6R8sSuQbXuKzZqsZEmcntBFAeQGghn6uD8oeBk16E+bWW4fMyGaC3FBDa 8HxAirmNLy78v3gh+LA3JQWWF7wkv4gR2ZqwaW++CtZ+jts1fGgGjIyBdSw8YNpDHvAO4OUct UqUF22JZhzSxODR9NPYLABXNPyTbAk7amjUbuZqoh4Dy1cxE2+IGA1BE5y5hRJThe0aoulWXs 9mYaQLaC2hasMFVjkSkiiuv2yz9w08ANZ+ru387rvfUslVBRKpltTSerdduIzjTottRzuQUAf gL6K3YDAYfAzMRupUtWt4ObqTvM51vXz8iwifEd4bX23YRqGmGjVj0yT+8Ok6GB9zxDZeN8rq 467gh5IcBuk9Hj1CqKIxYaCBNTTgMIbaeWFts5K1hsQwPwZk4fOELPy4nv6LhtYLx4ySWJmkl 7OxA0mQeDlkanhgyDd7sQsK6hb6ujrNErJFdzQTzKvwQ4rnTyvHZ7H5D5v+zjSZ/aurRD56O+ T1nYEcPlOPR0GPPu/3sFvDbPyyoOaKdZZ9EA+SuRJDduo+MUqBLQlLXq6u/hUfCSQMP2HaeBw uOwFLkxrlmhunwyionCNb+VT0r5Li/HQL8ooLUBQU2nybmAO5wPE5Y8x9JcEGzVJinmLFJ50f zFu/gDP1DisTXt3zhOFzhjPaZhREyYrUOz4/3kz/NwbTnMpifTOzYVKRluSsZ0gwmxYklldbe JqfKwMfTsDzLlFopNDuD4AKNXuhdTwazvUYssSlSnxwzf1LS5bXZ2dYh9PU15VFH7zQ2eaAIz 3DScMbfPes9VIkmDkhB+tI1apF7XWYf+Npa24SKCrkD6Y0gzNoNUL3ZbX4Ye7PYXifknktOJK dTugQir9c2YmfGKkErq4A+gfPkcccK8SKPf+IW429xqAOg7rIIEMF8KO6a6Eou55IBvsgyGvs GrtZVWEwOJs0BRMEq3JXiwiS3jY=
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author