Do you have a specific reason for creating the keystore from the command line? It can be done much more easily within Eclipse, just right-click your project, select Export / Export Android Application and in Keystore Selection window select the Create new keystore radio button, and fill in the details.
In case you really want to do it from the command line, from the original post it looks like at least two things went wrong:
1) In the page you copy-pasted it from, the keytool command and arguments were split to two lines, probably to look it more neat. However, you have to remove the newline before pasting the text to the Command Prompt window, otherwise the pasted text will be interpreted as two different commands.
2) The $ in the beginning is not part of the command itself, it's there just to show that the following stuff should be run in a shell window. So, the thing to copy-paste, assuming the JDK bin directory is included in path, would be:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000