svn添加用户shell
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了svn添加用户shell相关的知识,希望对你有一定的参考价值。
#!/bin/bash adduser(){ echo "Copy authz File authz to `date "+%Y%m%d%s"`"&&cp authz authz`date "+%Y%m%d%s"` # more authz | grep ^[A-Z] | grep $DP | sed ‘s/$/&,‘$USER‘/g‘ > authz.new sed -i ‘/^‘$DP‘/s/$/,‘$USER‘/‘ authz } process(){ if [ "$DP" != "" ] then for i in `more authz | grep "$DP =" | grep -v @ | awk ‘{print $3}‘ | tr "," "\n"` do more passwd | grep $i > /dev/null 2>&1 if [ $? = 1 ]; then echo "Copy passwd File to passwd`date "+%Y%m%d%s"`"&&cp passwd passwd`date "+%Y%m%d%s"` sed -i ‘/‘$DP‘/a\‘$i‘ = ‘$i‘@emoney‘ passwd more passwd | grep $i > /dev/null 2>&1 if [ $? = 0 ]; then echo "User $i Add Succes" else echo "User $i Add Flase" fi fi done else echo "Department ID not set" fi } read -p "Please Input New UserName:" USER read -p "Please Input Department ID:" DP case $DP in Market_SEM) adduser sleep 1 process ;; Market_UE) adduser sleep 1 process ;; JSB_JG) adduser sleep 1 process ;; JSB_OP) adduser sleep 1 process ;; Market_PD) adduser sleep 1 process ;; Market_mk2) adduser sleep 1 process ;; Market_PR) adduser sleep 1 process ;; *) if [ "$DP" = "" ] then echo "Department ID not set" else echo -e "Department Mistake\n#####Detail List######\nMarket_SEM\nMarket_UE\nJSB_JG\nJSB_OP\nMarket_PD\nMar ket_mk2\nMarket_PR\n#####Detail List######" fi ;; esac
以上是关于svn添加用户shell的主要内容,如果未能解决你的问题,请参考以下文章
svn报错cleanup failed–previous operation has not finished; run cleanup if it was interrupted的解决办法(代码片段