logo

utils-std

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

cat.1 (1240B)


  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 or if
  22. .Ar file is
  23. .Qq - ,
  24. .Nm
  25. reads from the standard input.
  26. .Sh OPTIONS
  27. The
  28. .Fl u
  29. option is ignored, present only for POSIX compatibility.
  30. .Sh EXIT STATUS
  31. .Ex -std
  32. .Sh EXAMPLES
  33. .Bl -tag -width Ds
  34. .It Ql cat file1 - file2 - file3
  35. Print the contents of
  36. .Ar file1 ;
  37. then copy standard input until EOF (^D) is received;
  38. then print the contents of
  39. .Ar file2 ;
  40. then the rest of standard input until EOF (^D) is received again;
  41. finally
  42. .Nm
  43. will print the contents of
  44. .Ar file3 .
  45. Note that when standard input refers to a file, the second dash
  46. does nothing as there isn't any remaining data to print.
  47. .It Ql time cat
  48. Get a stopwatch utility which stops once EOF is pressed.
  49. .El
  50. .Sh STANDARDS
  51. .Nm
  52. is mostly compliant with the
  53. IEEE Std 1003.1-2024 (“POSIX.1”)
  54. specification.
  55. .Sh AUTHORS
  56. .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me