As of right now, I'm trying to reach each word, with the first word being useradd
and the second word being groupadd
, but I'm having a bit of trouble with the ","
This is my username.txt
file:
jason,staff
henson,visitor
This is my current bash script:
#!/bin/bash
username="username2.txt"
while read username group; do
sudo useradd $username;
sudo groupadd $group;
done < $username