1. 清空文件
cat /dev/null > file.name
2. 实现输入不提示代码
#! /bin/sh
printf “Enter your password:”
stty –echo
read password < /dev/tty
printf “\nEnter again:”
read password2 < /dev/tty
stty echo
printf “\n”
echo “password 1 is : $password”
echo “password 2 is : $password2”
posted on 2011-12-13 23:12
DLevin 阅读(440)
评论(0) 编辑 收藏 所属分类:
Linux