Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Does shell create users in bulk and point out errors?

Shulou Source: shulou.com Published: 2022-06-03 07:44:01 09月23日 Update

The script comes from-some work unit # the script is wrong and I have corrected it when I am working. At work, I found an inexplicable script. I think there are a lot of mistakes in the script. Look at the errors and point out that you can improve your skills. #! / 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 yearly $(echo $num | sed's / ^ [0-9] * $'/ / g) if [- z "$y"] then for I/dev/null echo $pass | password-- stdin "$name$i" & > / dev/null done fifi

Tags: Script error work time unit technology user Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Technology Redmi Xiaomi MariaDB