String loop replacement files, variables can be used
#!/bin/bash
list = "001 002 003 004 0005"
for i in $list
do
sed -i "s/hello/world/" think_${i}.conf
sed -i "s/wusi/student${i}/" think_${i}.conf
done
The following is the name given user created:
first of all gives the name given user, and individually created
for user in {u1, u2, u3, u4}; This code instructions given user name in {u1, u2, u3, u4 } this array; taken individually for loop
do
useradd $ // add the User given the User
echo "123456" | passwd $ --stdin the User; // Set Password
done