Code:
Loop
Prompt for the name of the data file
Until data file exists
For every record of data file
Do
Determine user name
Determine user group
Determine user home directory
Verify that user doesnt already exist, if exist proceed next record
Create home directory if not exists
Create the user, if error proceed next record
Copy template files from /etc/skel to the home directory
Search and display user definition from /etc/password
End For
You'll need to use (it's just suggestions, it may have several solutions ):
Loop ... Until : 'while' or 'until'
Prompt : 'read'
For every .. End For : 'while' 'IFS' 'read' 'continue'
Verify user : grep /etc/password
Verify file or dir : 'test -e' 'test -d'
Create home dir : 'mkdir'
Create user : 'adduser' or other system specific command
Copy template : 'cp'
Search and display : 'grep'