My greeting
I want to create a variable in a script and leave it defined to be able to deposit data and rescue it in another script:
If in script1 I do
Code: Select all
MOMENT1 = `# date" +% H% m% s "`
(instead of for example date "+% H% m% s"> /tmp/tmpfile)
in another script, at another time after I can retrieve that data
So in If in script2 I do
Code: Select all
echo "$ MOMENT1"
and I get the data saved before in the first script. Even if it's already closed
As with the LANG variable
echo $ LANG
that its data can be extracted from any script
I already experimented with
Code: Select all
export MOMENT1 = `# date" +% H% m% s "`
global MOMENT1 = `# date" +% H% m% s "`
set MOMENT1 = `# date" +% H% m% s "`
but I close the script and execute another one with
Code: Select all
echo "$ MOMENT1"
and nothing.
Thanks