I have file <temp_test.sh> in which I have defined a variable Min_Inc=300000.
I then want to get the user input to change the value of Min_Inc. I followed these steps.
- Read the value using
echo $Min_Incand displayed it. - Sought User input for the new value and read it with
read New_Val. - Tried replacing
Min_Inc=300000withMin_Inc=$New_Valusingsedassed 's/Min_Inc=300000/Min_Inc=$New_Val/'
This gives an error message. Moreover, I want to make this change permanent which I can make by redirecting the output to another file.