I've defined an environment variable: export NBR_PROCESS=2
Basically, I should be able to update the variable, but when I execute the following script I get the same result on each run:
#!/bin/bash
echo "Script 2: Before decrement : $NBR_PROCESS"
export NBR_PROCESS=$(($NBR_PROCESS - 1))
echo "Script 2: After decrement : $NBR_PROCESS"
On each execution I get the same following result:
Script 2: Before decrement : 2
Script 2: After decrement : 1
What I would like to do is decrement the variable NBR_PROCESS
by running the script.