svn自动发用户名密码到邮件(明文密码)

#!/bin/sh
touch testlist
cat /dev/null > testlist
grep "=" passwd |grep -v "#"|grep -v "admin" > testlist
cat testlist |tr -s [:space:] > list.conf
rm -rf testlist user_list=`grep "=" list.conf |awk -F'=' '{print $1}'` for i in $user_list; do
pass=`grep $i list.conf |awk -F'=' '{print $2}'`
echo "svn://xxx:xxx USER : $i PASSWORD : "$pass |mail -s "【阅】svn" $i'@xxx.com'
done

0 0 * * 0  sh sendPass.sh  每周日凌晨发送

上一篇:JavaScript 中常用的 正则表达式


下一篇:ls 指令的介绍