Obfuscate sentence by scrambling letters except first and last #ruby #shell obfuscate-sentence #!/usr/bin/env ruby ARGF.read.split("\n").each do |line| puts line .split(' ') .map { |s| s[0] + s[1..-2].split('').shuffle.join('') + s[-1] } .join(' ') end