I'm trying to use the command: env -0
but it give me this output:
env: illegal option -- 0
usage: env [-iv] [-P utilpath] [-S string] [-u name]
[name=value ...] [utility [argument ...]]
Bash version: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
OS: macOS Big Sur 11.6.8
How can I make the env
command understand the -0 flag?
CodePudding user response:
You have options:
env | tr '\12' '\0'
Pass newline separated
env
output throughtr
to change newlines to \0./opt/homebrew/Cellar/coreutils/9.1/libexec/gnubin/env
Supply fill path toenv
.Modify your PATH/path variable in any of these
~/.zshrc
,~/.bash_profile
,~/.cshrc
, or~/.login
to the directory ofgenv
.
If you are unsure of where genv is installed, do thisfind /opt/homebrew /usr/local -name genv -print
.