#!/bin/bash # Author: yeho # BLOG: https://linuxeye.com # # Notes: OneinStack for CentOS/RedHat 6+ Debian 8+ and Ubuntu 14+ # # Project home page: # https://oneinstack.com # https://github.com/oneinstack/oneinstack get_char() { SAVEDSTTY=`stty -g` stty -echo stty cbreak dd if=/dev/tty bs=1 count=1 2> /dev/null stty -raw stty echo stty $SAVEDSTTY }