Hello I am trying to develop a shell script that takes a text file such as this...
E-mail@ Soc.Sec.No. *--------Name-----------* Class *School.Curriculum.Major.* Campus.Phone
JCC2380 XXX-XX-XXXX CAREY, JULIE C JR-II BISS CPSC BS INFO TECH 412/779-9445
JAC1936 XXX-XX-XXXX CONSOLMAGNO, JOE A. SO-I BISS CPSC BS INFO TECH 412/833-7993
ACC4636 XXX-XX-XXXX CURRIE, ADAM C. JR-II BISS CPSC BS COMP SCI 724/657-0437
SPF1696 XXX-XX-XXXX FARLEY, SEAN P. JR-I BISS CPSC BS COMP SCI 814/236-2398
SEK8835 XXX-XX-XXXX KELLEY, SHAWN E. FR-II BISS CPSC BS COMP SCI 724/406-7149
MCK0599 XXX-XX-XXXX KOMISIN, MICHAEL C. JR-I BISS CPSC BS COMP SCI 000/000-0000
GJM1887 XXX-XX-XXXX MACK, GREGORY J. SO-II BISS CPSC BS INFO TECH 724/735-4354
NGM5479 XXX-XX-XXXX MCINTIRE, NICHOLAS G JR-I BISS CPSC BS INFO TECH 724/794-8268
ZTP7190 XXX-XX-XXXX PETAK, ZACHARY T. FR-II BISS CPSC BS INFO TECH 724/406-1298
AXS9097 XXX-XX-XXXX SAUNDERS, ALEXANDER SO-I BISS CPSC BS INFO TECH 724/334-0313
RJS6624 XXX-XX-XXXX SNYDER, ROBERT J. SO-II BISS CPSC BS COMP SCI 814/328-2021
MWS1990 XXX-XX-XXXX STASNY, MATTHEW W SO-II BISS CPSC BS INFO TECH 412/882-0581
from the command line and then the output would be the <i>username:password</i>
The user name is the email name but it must be lowercase instead of uppercase, and the password is the first letters class, school, curriculum and major followed by the last 4 digits of the user's phone number.
The output of should look something like this...
jcc2380:jbci9445
jac1936:sbci7993
I am using the output with the newusers command to create new accounts in our system, but I am not very good with my parsing to produce this output
Many thanks,
Crim