You are basically trying to echo the value stored in the variable x. But when you run "echo x" you are telling the system to echo the character x. To print the value, you have to use the dollar sign to inform the system that it is a variable. This should work:
# echo $x