I have the following environment variable timestamp. I am calling the environment variable by the following however the output is just date. why is it not giving the actual timestamp?
NOT assignment of the variable TIMESTAMP, but is a description of the the value that it has.
environment variable
TIMESTAMP=date +%Y-%m-%dT%H:%M:%S.%7NZ -d '-7 day'
input
TIMESTAMP=($TIMESTAMP)
echo "debug environment variables: $TIMESTAMP:"
output:
debug environment variables: date
TIMESTAMP
is a shell variable, not an environment variable. Also, the code you posted does not make sense. Please show one complete script (not just snippets), and then describe what effect you see, and what you hope to see.+%Y-%m-%dT%H:%M:%S.%7NZ
with TIMESTAMP set in its environment.) The question should be edited for clarity.