I've found in a bash script following line:

export >/dev/stderr

what does it mean?


It is meant to print the environment somewhere else than in stdout, probably because the output will be piped to another program or in a file. What I don't know is why it uses the command export and not env. But maybe the script is much more complex than that and reads or even executes the content of stderr, anyway stderr is meant as I said to print some output while it being ignored by redirectors or pipes.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.