Two Part Question Parat 1 Consider Address Book Cat Addr Xiao Li Lxiao Uncedu 6705462234 J Q13504983

This is a two part question

Parat 1:

Consider the address book below:

$ cat addr
Xiao Li, lxiao@unc.edu, 6705462234, Jackson, NC 764
Natkin William, wnatkin@imap28.vcu.edu, 8044344528, Richmond, VA22345
Elizi Moe, emoe@ncsu.edu, 5208534566, Tempe, AZ 85282
Ma Ta, mta@yahoo.com, 4345667345, Austin, TX 91030
Diana Cheng, dcheng@asu.edu, 5203456789, Matitsi, WY 4587
Jackson Five, jfive@ncsu.edu, 5206564573, Kyenta, AZ 85483
Adi SrikanthReddy, sadi1@imap1.asu.edu, 6578904566, Wyo, WS67854

Write a script called activity5.3-4.awk to print the full name,Email Address, state and zip for those with an “imap” email. Besure to use multi-line statements for improved readability. Includethe header identifying each field, and a footer indicating the endof listing.

Part 2:
The /etc/group file defines the groups to which users belong. Itsformat is as followed:

Group : password : Group ID : Group List
Group List of usernames for users who are members of thegroup
Password is an encrypted field and will usually show “x”
Group is the name of the group, shown in the group field of ls–l

Write an awk script, called activity5.3-5.awk, that displays thegroup name and usernames of group members. Groups without membersshall not be displayed.

Also provide the command to run the script

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *