#!/usr/bin/ruby
# 回显输入
print "Please input username: "
username = gets.chomp
# 无回显输入
print "Please input password: "
system "stty -echo"
password = gets.chomp
system "stty echo"
# 显示输入内容
puts "", "-" * 32
puts "Username: " + username
puts "Password: " + password