Can somebody tell me why my command language interpreter shell shows me an empty string as the result after the command
$ echo $VERSION
And only after executing this command
$ . /etc/os-release
it begins to show me the result of that command
$ echo $VERSION
18.04.3 LTS (Bionic Beaver)
can you, please, explain me what happens after that command? Why had not shell shown it before? Why does shell show it now?
os-release
is technically not a shell script (seeman os-release
); you have missed explaining the important point that there is no standardVERSION
shell variable; and Unix and Linux has https://unix.stackexchange.com/q/58514/5132, and https://unix.stackexchange.com/q/17815/5132, and https://unix.stackexchange.com/q/43882/5132, and https://unix.stackexchange.com/q/312573/5132, and https://unix.stackexchange.com/q/459087/5132, and … – JdeBP Jan 10 '20 at 06:55