Question: Start with this command: finger -l | grep Login: | awk '{gsub(/./, , $0); print $0}' this will output lines with user names

Start with this command:

finger -l | grep Login: | awk '{gsub(/\./, " " , $0); print $0}'

this will output lines with user names split into first and last names:

Login: mike nol Name: INSTRUCTOR Mike Nol Login: bugz bunny Name: STUDENT IN 24736

Modify this command to add another awk program at the end of the line so that you return just the users on our system that have the letter r in their first name, or last name. Note also that the r can be r or R.

So, you are adding to the end of the given command like so:

finger -l | grep Login: | awk '{gsub(/\./, " " , $0); print $0}' | awk YOUR PROGRAM HERE

inline or in a file doesn't matter, just include all of your code in your answer.

Output would be similar to:

Login: tring Ring NAME : STUDENT IN 22746

Login: Roger Ring NAME : STUDENT IN 22746

Login: Rachu Brown NAME : INSTRUCTOR Rachu Brown

note: the letter r or R has to appear either in their first name or last name only,(i.e., you aren't searching the whole line, just the first and last name, so an r anywhere on the line except in the first and last name wouldn't be enough to include in the output if it happens to have r in it.)

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 Databases Questions!