You are not logged in.
http://pubs.opengroup.org/onlinepubs/00 … /time.html
Without `time` package from `extra` repo standard-compliant `time -p foo bar` doesn't work in `sh` or `sh --posix`.
Unfortunately I couldn't find discussion if any, as `time` is so common keyword.
Offline
Offline
The POSIX standard doesnt/didn't require that `time` be a separate installed package. Time is a bash shell built in, and the bash built-in version meets the POSIX standard. How does `time -p foo bar` not work?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The POSIX standard requires `sh` utility to be present and requires `sh -c "time -p ls"` to work. In Archlinux this doesn't work in the base system as it only works if `time` package outside of `base` group is installed . It is irrelevant whether it works in bash or not.
So adding `time` package to `base` group will improve POSIX compliance as more standard-compliant scripts will run.
So I have 3 questions:
1) Is compliance to IEEE Std 1003.1 among design goals of `base` package group?
2) Is it a bug that sh -c "time ls" fails to run `time` builtin utility and looks for an executable instead?
3) If answer to (1) is "yes" and answer to (2) is "no" is it a bug that `time` is not in `base`?
Offline
The POSIX standard requires ... `sh -c "time -p ls"` to work.
Where is this requirement? It's not in the link you posted.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
sh - says `sh -c command` should work with utilities.
time - says `time` is a valid utility and -p is a valid option
`time -p ls` I think is not required to work as `ls` may be built-in. But it's only an example - feel free to replace it with an executable of your choice.
Last edited by nponeccop (2013-02-26 12:56:17)
Offline
So, GNU time last saw a release in 1996, and has to be patched in Linux so as not to produce garbage output. Not a very good standard piece of software!
I don't even see it in e.g. opensuse at all. And I've never heard of any software that requires it.
feel free to replace it with an executable of your choice.
No, *you* come up with a decent example of something worth caring about ![]()
Offline
"Arch is what you make it". If you want your system to conform to some outdated standard, you can by installing the needed packages. It is not a very strong consideration in Arch development...
Offline