The shell creates the user in bulk and points out the error?

Source: Internet
Author: User

The script comes from----a work unit     #脚本是错误的, and I've corrected it when I work.          work in the time I found a inexplicable script   I think the script writes a lot of errors  ~                                  let's see where the error is and point out that you are upgrading your technology.   #!/bin/bsah#Batch add userread -t 30 -p  "Please input name :  " nameread -t 30 -p " please input num:  "  numread  -t 30 -p  "please input passwoed: "  passif [ ! -z  $name  -a ! -z  $num  -a ! -z  $pass  ]         then                 y=$ (echo  $num  | sed  ' s/^[0-9]*$ '//g)          if [ -z  "$y"  ]                 then                         for  ( i=1;i<= $num; i=i+1  )                 do                          useradd  $name $i &>/dev/null                          echo  $pass  | password --stdin  "$name $i"  &>/dev/null                 done         fifi 


This article is from the "I am a Little bird" blog, please make sure to keep this source http://liyanchao.blog.51cto.com/9954601/1684275

The shell creates the user in bulk and points out the error?

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.