logo

utils-std

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

cat.1 (1215B)


  1. .\" utils-std: Collection of commonly available Unix tools
  2. .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. .\" SPDX-License-Identifier: MPL-2.0
  4. .Dd 2022-02-13
  5. .Dt CAT 1
  6. .Os
  7. .Sh NAME
  8. .Nm cat
  9. .Nd concatenate files
  10. .Sh SYNOPSIS
  11. .Nm
  12. .Op Fl u
  13. .Op Ar file...
  14. .Sh DESCRIPTION
  15. .Nm
  16. reads each
  17. .Ar file
  18. in sequence and writes it on the standard output.
  19. If no
  20. .Ar file
  21. is given,
  22. .Nm
  23. reads from the standard input.
  24. .Sh OPTIONS
  25. The
  26. .Fl u
  27. option is ignored, present only for POSIX compatibility.
  28. .Sh EXIT STATUS
  29. .Ex -std
  30. .Sh EXAMPLES
  31. .Bl -tag -width Ds
  32. .It Ql cat file1 - file2 - file3
  33. Print the contents of
  34. .Ar file1 ;
  35. then copy standard input until EOF (^D) is received;
  36. then print the contents of
  37. .Ar file2 ;
  38. then the rest of standard input until EOF (^D) is received again;
  39. finally
  40. .Nm
  41. will print the contents of
  42. .Ar file3 .
  43. Note that when standard input refers to a file, the second dash
  44. does nothing as there isn't any remaining data to print.
  45. .It Ql time cat
  46. Get a stopwatch utility which stops once EOF is pressed.
  47. .El
  48. .Sh STANDARDS
  49. .Nm
  50. is mostly compliant with the
  51. IEEE Std 1003.1-2024 (“POSIX.1”)
  52. specification.
  53. .Sh AUTHORS
  54. .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me