- echo 'if U try run this script must need dialog this programs'
- yum -y install dialog
- DIA='/usr/bin/dialog'
- i="/tmp/inputbox.$$"
- dialog --inputbox "请输入用户名" 20 60 2> $i
- USER=$(cat $i)
- if grep -q ^$USER /etc/passwd
- then
- dialog --msgbox "账户存在" 20 60
- dialog --msgbox "$USER 账户基本信息是 `id $USER`" 20 60
- rm -rf $i
- else
- dialog --msgbox "$USER 帐号不存在" 20 60
- rm -rf $i
- fi