logo

utils

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

env.1 (1472B)


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