unix so far I have this code awk -F \",\" \' {print $1, $4, $3, $6}\' file1 whic
ID: 3736088 • Letter: U
Question
unix
so far I have this code
awk -F "," ' {print $1, $4, $3, $6}' file1
which outputs
XiaoLi 6705462234 lxiao@unc.edu NC764
NatkinPook 8044344528 wnatkin@vcu.edu VA22345
EliziMoe 5208534566 emoe@ncsu.edu AZ85282
MaTa 4345667345 mta@yahoo.com TX91030
DianaCheng 5203456789 dcheng@asu.edu WY4587
JacksonFive 5206564573 jfive@ncsu.edu AZ85483
AdiSrikanthReddy 6578904566 sadi1@asu.edu WS67854
I want to separate the first and last name [which is the runon words at the beginning] and make the phones numbers in (###)-###-### format and then separate state and zipcode. I would prefer sticking to awk
so like this
Xiao Li (670)546-2234 lxiao@unc.edu NC 764
Explanation / Answer
awk -F "," ' {print $1,
$4, $3, $6}' file1
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.