Hi, I am new to bash scripting. I have some questions here, Can anybody help?
I have a text file which has the following format.
UserNam
User full name
road and house nr.
post nr, city
phone, mobil
Department, job
The first thing should be to open file and find :ADD_USERS,
Then read then next line until the user name appears. Here the first user name is JOLA.
1 .Add "JOLA" user to the system with "adduser" command.
2. Then add the rest of information to another text file named "UserData".
Read the next user and continue step 1 and 2, until ":DELETE_USER" appear.
Read the name of user and delete it from system. there will be many users, loop trough then til EOF.
Here is the text file.
___________________________________________
:ADD_USERS
JOLA
John Larsen
Downtown 4, 2.tv
4534, Longby
45434444, 89765445
Electronics, Electrisian
LALA
Lars Larsen
Downtown 7
5345, Loncity
-, 23423423
Electonics, Electrisian
:DELETE_USERS
labe
gama
_____________________________________________________
adv. thanks for help
Kursist.