Reputation: 123
I am new to bash scripting. I came across the following piece of code and I am not able to figure it out. Please help me understand.
var1=$var1 some_function_call $var2
var2 is argument to "some_function_call" function.
I am not able to figure out exactly what is going on here. Thanks in advance.
Also any pointer to good bash scripting tutorials would be nice.
Thanks.
Upvotes: 1
Views: 48
Reputation: 799410
The environment of the new some_function_call
process has "var1" set to the value of $var1
; the environment variable does not change in the main interpreter. The value in $var2
is passed as an argument to some_function_call
.
Upvotes: 4