I am writing my own script to install my Arch Linux. I will only have few options to change every time I reinstall the system or use my script in another device. Is there a way I can write the variables at the top of my script? I came across something similar to the below but it doesn't seem to work:
disk="nvme0n1"
locale="en_US.UTF-8"
and then somewhere in the script there will be:
gdisk /dev/$disk
echo 'LANG=$locale' >> /etc/locale.conf
I can then just modify my variables at the top of my script every time I want to change something.
I am a beginner in writing scripts. I am happy if someone can explain another/better way of achieving the above.