I have a requirement to achieve in shell script.
There are two scripts script1, script2. When I run the first script two variables are created and are having some values. It will finish its execution. (the values will be right here as the script finished executing right?)
Script2 will be executed again manually later on(not sure when this script will be executed, may 30 mins or even 1 day as we have to fix something after the script1 runs).
Now I wanted to get the variables which were created in script 1 into script 2. Is that possible?
sh-compatible answer, or is abash-only one acceptable? (Using both tags makes that ambiguous).shandbashare two different (POSIX-compliant) shell languages, just as C and C++ are different compiled languages. (Or, rather,shis a name guaranteed to provide an interpreter for a POSIX sh shell, but not guaranteed to support any features not in that standard -- it may be implemented byash,dash, or others;bashis a specific shell with a bunch of extensions that are often helpful, but which also runs much slower than many of the baseline shells). If you use the bash tag, expect an answer that works in bash but not withsh.