This question already has an answer here:
I am working on a shell script that when first opened asks the user for some info. This info needs to be stored on a config file for future use so that the user doesn't have to answer the same questions every time the program opens. Of course, I am planning on writing an if statement to check whether the info is in the config file every time the script is used, but I don't know how to create a config file. I would like to know how I can do this from the shell script itself, so that if a person downloads my script and uses it the config file is created for them. I would also like to know how I can add the info into the config file from the script. Thanks for your help.