Oh my god, I feel like I didn’t understand this post? Can anyone explain it a bit.
I just dont have one thing straight @TazWake. What does this “env | grep” do?
This wasn’t mentioned until now in Linux Fundamentals. Is it expected from us to know it?
So, @mercius, it has been three years since I looked at this and I genuinely cant remember what is and isn’t covered.
However:
Using env
without any arguments will cause Linux to show you the contents of the various environment variables on the system.
|
is a “pipe” redirector that takes the output of the command on the left side of the pipe and uses it as the input for the command on the right side.
grep MAIL
uses grep, which is ultimately a pattern-matching tool, to match any instances of the string MAIL
(this is a case-sensitive match).
In this example, it should return the MAIL
environment variable on the system.
Appreciate it brother. Thanks a lot.