Hi folks.
I ran into a problem with trying to create a filename in a ksh script (on SunOS 5.9), which has a variable at the beginning.
Like this:
Code:
myvar=Hoppla
cp original_file.log $myvar_copy.log
The resulting filename is then:
However, this works:
Code:
myvar=Hoppla
cp original_file.log copy_$myvar.log
Resulting filename now:
I noticed the same issue also when redirecting output to a file this way:
Code:
myvar=Hoppla
echo "Test" > $myvar_testfile.log
Result:
What's the deal with the position of the parameter?
