This is for my linux class. Consider the address book below: $ cat addr Xiao Li,
ID: 3792387 • Letter: T
Question
This is for my linux class.
Consider the address book below:
$ cat addr
Xiao Li, lxiao@unc.edu, 6705462234, Jackson, NC 764
Natkin William, wnatkin@imap28.vcu.edu, 8044344528, Richmond, VA 22345
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, WS 67854
Write a script called activity5.3-4.awk to print the full name, Email Address, state and zip for those with an “imap” email. Do this using the "awk" command. Be sure to use multi-line statements for improved readability. Include the header identifying each field, and a footer indicating the end of listing.
Explanation / Answer
# input file -- name, email, phonenumber, state and zip
{ print "" # output blank line
print $1 # full name
print $2 # email address
print $4, $5 # state and zip
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.