Quantcast
Channel: What's the difference between set, export and env and when should I use each? - Ask Ubuntu
Browsing all 2 articles
Browse latest View live

Answer by January for What's the difference between set, export and env and...

Let us consider a specific example. The grep command uses an environment variable called GREP_OPTIONS to set default options. Now. Given that the file test.txt contains the following lines: line one...

View Article



What's the difference between set, export and env and when should I use each?

Every so often I'll bash out a bash script and it strikes me there are a few ways of setting a variable: key=value env key=value export key=value When you're inside a script or a single command (for...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images