BASH script variables have no values

I am writing a simple script to clean up log folders. This is the most basic thing I can think of, and yet it does not work because the variables don't seem to be set. Here is the shell script beginning, where it fails:

#!/bin/bash
X3DBASE=/data/DassaultSystemes/R2020x
echo X3DBASE=$X3DBASE
read

And, here is the output:

$ ./cleanlogs.sh
X3DBASE=
^C
$

What am I doing wrong? I also tried removing the first line, in case a shell specification were somehow messing things up.


Solution 1:

OK, this is a perfect case of misreading the screen. The variable names are so close but 1 character different. Put this one down to error between seat and keyboard.