1

What does this command mean in a shell script? What is the functionality of writing this command in the shell script??

. /opt/pat/staging/config/VARIABLES>>/dev/null
AS Mackay
  • 2,831
  • 9
  • 19
  • 25
  • If this were broken down into smaller questions ("what does `. somescript` do?" and "what does `>>/dev/null` mean?"), this might have made it easier to find an individual answer for each. – Charles Duffy Aug 24 '18 at 14:48

2 Answers2

1

Sources the file in order to load the variables into your current environment and sends only stdout (not stderr) to /dev/null (black hole, if you will).

To send both stdout and stderr you would do >/dev/null 2>&1.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
py9
  • 598
  • 5
  • 15
0

Runs the script in the context of the current shell and sends all its output to the null device to avoid having it in the current standard output.

tripleee
  • 175,061
  • 34
  • 275
  • 318
Poshi
  • 5,332
  • 3
  • 15
  • 32