(In Ruby) I need to make a script to complete this task. Not toosure on how to do this.
As the system administrator of your company, you have beenassigned the task of creating user accounts for employees. The fileattached (employeedata.csv) has the detailsof new employees hired recently. Based on the content of the file,you are required to write a script to create user accounts for allemployees based on the following rules;
- For each employee, the username should be a combination of lastname, first character of first name and last character of the firstname. For example, an employee with First name John and Last nameDoe would have a username of Doejn.
- Assume usernames are not case sensitive
- In the event that two or more employees have same first andlast names, append a suffix (a number) to the username.EgDoejn1,Doejn2 etc.
- For each username, create a user account using the Linuxuseradd command (as part of your rubyscript). In using this command, ensure that the First and LastNames form part of the account information for each user. Forexample, while creating an account with username Doejn, the fullname “John Doe” has to be included.
- Write the First Name, Last Name and username generated to a CSVfile named useraccounts.csv
employeedata.csv file contains:
Answer to (In Ruby) I need to make a script to complete this task. Not too sure on how to do this. As the system administrator of …