Search code examples
bashvariablesscriptingmoc

Configurescript for another script


I am creating a simple bash script which opens a mediaplayer at a certain time and increases it's volume over time. Since I want to share this script later with several people I was wondering if it is possible to create another script that let's the other users change values to their liking.

I know simply opening the script via texteditor would solve the problem but since I am new to bashscripting I'd love to know if there is a way of doing this without using a texteditor


Solution

  • simplest way

    source your config file

    . /pathto/myconfig

    then set the values in the config file that can be opened in a text editor

    #explanation of parameter
    PARAM1="...."