A few random questions:
What is the difference between:
Also, this question may be related:
If the output of a command is set as a variable in the beginning of the script, and later during that script the output of the original command that became the variable changes, does the variable change when it is called upon? In other words, when the command for the variable is ran to set the variable, is it simply "remembered" and static for the remainder of the script, or would that command be ran every time that variable is called in the script?
2 CURDATE=`date +%m-%d-%y`
3 blah blah blah
4 somecommand 1> $CURDATE.stdout
Assume line two happens on Tuesday, but the script does not get to line 4 until the next day, Wednesday. Would that stdout file have the date of Tuesday even though it happened on Wednesday, or would the date command within the $CURDATE variable be re-ran when it is called upon and have the date of Wednesday?