This command will randomly generate a number between 0 and 1000, and then use that number to replace the end of a line with the phrase "Hello World".
awk 'BEGIN { print int(rand()*1000)}' | xargs sed -i 's/$/ echo "Hello World"/g'