Help with shell command to get a result in a node

You don't even need to create the x variable
msg.payload = parseInt(msg.payload)
will do the trick nicely