friends,
I have a situation where i am using a $RANDOM function along with the filename, I want this to be escaped by the OS in the first assignment (works as expected) and executed in the second assignment (does not execute $RANDOM)
filename1=filename1_\$RANDOM
echo $filename1
filename2=filename1
echo $filename2
The output of $filename1 is filename1_$RANDOM
The output of $filename2 is filename1_$RANDOM (i am expecting the $RANDOM to be substituted by a random number in the second assignment, since there is no escape character not sure why the shell is not substituting $RANDOM with a number)