Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started