I am learning bash script and I am reading some sample code. Anyone can advice me the detail and meaning of the following code? Thanks in advance!
END_DATE=`date -u "+%FT%TZ" `
I am learning bash script and I am reading some sample code. Anyone can advice me the detail and meaning of the following code? Thanks in advance!
END_DATE=`date -u "+%FT%TZ" `
The backticks are performing Command Sbustitution. The command inside the backticks is executed in a subshell and the result is assigned to the variable. (another syntax that would work the same in bash is $(command)
)
The string for the date command is how format is specified for the date command.