Question: using the linux command don't forget to add /home/`whom`/Desktop so I can run to my command Make sure you include comments for each line of

using the linux command don't forget to add /home/`whom`/Desktop so I can run to my command

Make sure you include comments for each line of code.

Remember that if you don't include comments, then you will receive a zero for your grade.

Advanced Array Part 1

  • make a directory called your YourFirstInitalLastnameScripts on the desktop.
  • Use the touch command to make a txt file within the directory called YourFirstInitalLastname Accounts.txt
  • Populate the usernames in the text file with a "FOR" loop by taking input from the user.
  • Use the "echo" and "read" command to made this operation. The "read" command will allow you to take input from the user.
  • Use the >> characters to append each username to your text file.

Advanced Array Part 2

  • Assign a variable called myFilename to the path to the file you made in step 1.
  • Use the "cat" command to populate your array with the $myFilename variable.
  • Use a "for" loop to run through each entry in your array and create the new users with a password of P@ssw0rd. You must have at least 5 users in your array.
  • Use the "getent" command to verify that your users were successfully created.
  • Use the "sleep" command to separate the next task from this task.

Advanced Array Part 3

  • Assign a variable called myFilename to the path to the file you made in step 1.
  • Use the "cat" command to populate your array with the $myFilename variable.
  • Use a "for" loop to run through each entry in your array and delete each user.
  • Use the "getent" command to verify that your users were successfully deleted.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!