I am new to bash scripting, so if I ask anything stupid sorry for it xD
I'm making a script which run come cli commands everyday. The output which I get from the cli command is a ID which I have to use that same next day. So its like
cli-command-delete $oldid; # here we delete the old id which was generated past day newid=$(cli-command-create) #here we get the new id.
Now I want to save the newid to oldid, which will be used next day or next time when the script will run. How can I save it as a env variable & replace that value after new id is created? If vm reboots, will that value be saved? I saw on google to use export, but I'm confused how to save it on other name