I have user settings in my shell script. How can I ask user for input and remember it? In example i have in code:
ALTERNATEMEMORY="false"
I need to ask user for input (when running script in 'configure' mode):
echo "Use alternate memory?"
select yn in "true" "false"; do
case $yn in
Yes ) [permament save ALTERNATEMEMORY as "true"];;
No ) [permament save ALTERNATEMEMORY as "false"];;
esac
done
Script should ask user as above, read his input, and depending of choice set ALTERNATEMEMORY
to corresponding state. Next time when running script (not configuring, just running) it should remember that setting. What should I put in these square brackets?
If I'm making mistakes when posting question, please forgive me - this is first time when I'm using stackoverflow.