logo

utils-std

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

head.t (419B)


  1. #!/usr/bin/env cram
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. $ export PATH="$TESTDIR/../cmd:$PATH"
  5. $ test "$(command -v head)" = "$TESTDIR/../cmd/head"
  6. $ set -o pipefail
  7. $ </dev/zero head -c 40 | wc -c
  8. 40
  9. $ </dev/zero head -c 40K | wc -c
  10. 40960
  11. $ </dev/zero head -c 40d | wc -c
  12. head: Unrecognised unit 'd'
  13. 0
  14. [1]