SVN Add user Shell

Source: Internet
Author: User

#!/bin/bashadduser () {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/$/&amp, ' $USER '/g ' > authz.new sed-i '/^ ' $DP '/s/$/, ' $USER '/' authz}process () {if ["$DP"! = ""]t Hen for I in ' more Authz | grep "$DP =" | Grep-v @ | awk ' {print $} ' | 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 E         Cho "User $i Add flase"               fi fi doneelse echo "Department ID not set" Fi}read-p "please Input New Userna Me: "Userread-p" please Input Department ID: "Dpcase $DP Inmarket_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\nmarket_mk2\ nmarket_pr\n#### #Detail list###### "FI; Esac

  

SVN Add user Shell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.