main.sh 188 B

12345678910
  1. #!/bin/bash
  2. users=("user1" "user2" "user3")
  3. output_file="user_list.txt"
  4. for user in "${users[@]}"; do
  5. echo "Creating new user: useradd $user"
  6. echo "$user" >> "$output_file"
  7. done