logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/

time.t (616B)


  1. #!/usr/bin/env cram
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. $ cd $TESTDIR/../cmd
  5. $ ./time
  6. Usage: time [-p|-v] command [argument ...]
  7. $ ./time -f
  8. time: error: Unrecognised option: '-f'
  9. Usage: time [-p|-v] command [argument ...]
  10. [1]
  11. $ ./time /var/empty/e/no/ent
  12. time: error: Failed executing '/var/empty/e/no/ent': No such file or directory
  13. [127]
  14. $ ./time false
  15. real 0.[0-9]* (re)
  16. user 0.[0-9]* (re)
  17. sys 0.[0-9]* (re)
  18. [1]
  19. $ ./time true
  20. real 0.[0-9]* (re)
  21. user 0.[0-9]* (re)
  22. sys 0.[0-9]* (re)