Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a. Create the following output Enter User's Full Name : Enter a first name B last name; alpha and space only> [Note: B means a

image text in transcribed
a. Create the following output Enter User's Full Name : Enter a first name B last name; alpha and space only> [Note: B means a blank space] Enter User's iD : [Ener any 6 digit number] Enter User's Job Location : [Make sure to enter AA99 pattern job location, eg: BX56, CR91] Enter User's Manager Code : [Ener any 6 digit number] No need to have data validation code in your script. Always enter the exact patterns shown above. Then Run the script, read input and print the result on screen. (Get a screen dump) b. Add more code to the above (a.) script to pipe the output (i.e. user's information) to a file name with the pattern firstname_lastname.usr and save that file in the test_users directory created above. Hints: 1,e, if the user's ful1 name is John Jacob, a file named John_Jacob.unr must be created and his Ful1 Name, User ID, Job Location and Manager Code must go into that file. Then, if you run the program again, this time you enter Mary Rivera as the full name. Then a file naned Mary_Rivera. usr must be created for that user and her Ful1 Name, User ID, Job Location and Manager code must go to Mary,Rivera, usf file. Basically, each user's information goes into that user's own file name. It you enter n users, then n number of files must be created, one per user. As you can see the file. name pactern is firstnase._lastname.usr. But the actual file names are, as have explained above. ITest with at least 2 users. Then Get a screen dump of the test users directory. See class note pages 34,37 and Bash Practice Questions 02 question 4 for hints). 3. Write a bash script to (Note, you are using the user files you created in 2b in this question) a. Read a file name with the pattern firstname_lastname.usr and then read that file from the test_users directory and echo that user's information from the file. [get minimum of 2 user screen dumps] b. If the entered file name is not existing in the test_users directory echo a message "file : clirstname lastname.usrs does not exists". [Test it out by entering a non-existing file name and get a screen dump of the result. See class notes pages 35, 58 for hints]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago

Question

Examine various types of executive compensation plans.

Answered: 1 week ago

Question

1. What is the meaning and definition of banks ?

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago