logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git

env.1 (1422B)


  1. .\" Collection of Unix tools, comparable to coreutils
  2. .\" Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. .\" SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
  4. .Dd 2022-04-19
  5. .Dt ENV 1
  6. .Os
  7. .Sh NAME
  8. .Nm env
  9. .Nd control and print environment
  10. .Sh SYNOPSIS
  11. .Nm
  12. .Op Fl i
  13. .Op Fl u Ar name
  14. .Op Ar name=value
  15. .Op Ar command Op Ar argument ...
  16. .Sh DESCRIPTION
  17. .Nm
  18. with no arguments prints the environment, or if specified runs
  19. .Ar command .
  20. .Pp
  21. The environment can be modified via the following options:
  22. .Bl -tag -width Ds
  23. .It Fl i
  24. Ignore the existing environment.
  25. .It Fl u Ar name
  26. Removes the variable named
  27. .Ar name
  28. from the new environment.
  29. .It Ar name=value
  30. Adds the variable named
  31. .Ar name
  32. with the value
  33. .Ar value
  34. into the new environment, it cannot itself contain the
  35. .Qq =
  36. character.
  37. .El
  38. .Sh EXIT STATUS
  39. If
  40. .Ar command
  41. is invoked, the exit status of
  42. .Nm
  43. shall be the exit status of
  44. .Ar command ;
  45. Otherwise, the env utility shall exist with one of the following values:
  46. .Bl -tag -width Ds
  47. .It 0
  48. .Nm
  49. completed successfully.
  50. .It 1
  51. An error occured in
  52. .Nm
  53. .It 126
  54. .Ar command
  55. was found but couldn't be invoked.
  56. .It 127
  57. .Ar command
  58. wasn't found.
  59. .El
  60. .Sh STANDARDS
  61. .Nm
  62. is compliant with the
  63. .St -p1003.1-2008
  64. specification.
  65. .Pp
  66. The
  67. .Fl u
  68. flag is an extension known to be present in FreeBSD, NetBSD, GNU coreutils, BusyBox, ...
  69. .Sh AUTHORS
  70. .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me