logo

utils-std

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

join.sh (798B)


  1. #!/bin/sh
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. WD="$(dirname "$0")/../"
  5. target="${WD}/cmd/join"
  6. plans=3
  7. . "${WD}/test-cmd/tap.sh"
  8. t_args phones_fiction \
  9. '!Name Phone Number Origin
  10. Mary +1 (415) 273-9164 Sneakers (1992 film)
  11. Аквариум +7 212-85-06 Russian band
  12. Ann 555-0179 Frasier
  13. ' \
  14. -t ' ' -a 1 -a 2 -e '(unknown)' -o 0,1.2,2.2 \
  15. "${WD}/test-cmd/inputs/join/phone.txt" \
  16. "${WD}/test-cmd/inputs/join/origin.txt"
  17. t_args posix_ax_az_ap \
  18. 'a x p
  19. a y p
  20. a z p
  21. ' \
  22. "${WD}/test-cmd/inputs/join/ax-az" \
  23. "${WD}/test-cmd/inputs/join/ap"
  24. t_args posix_ac_ae_ap \
  25. 'a b c w x
  26. a b c y z
  27. a b c o p
  28. a d e w x
  29. a d e y z
  30. a d e o p
  31. ' \
  32. "${WD}/test-cmd/inputs/join/abc-ade" \
  33. "${WD}/test-cmd/inputs/join/awx-aop"