How to read records in a file and sort it?

view story

http://www.unix.com – I have a file which has number of pipe delimited records. I am able to read the records....but I want to sort it after reading. i=0 while IFS="|" read -r usrId dataOwn expire email group secProf startDt endDt smhRole RoleCat DataProf SysRole MesgRole SearchProf do print $usrId $dataOwn $expire $email $group $secProf $startDt $endDt $smhRole $RoleCat $DataProf $SysRole $MesgRole $SearchProf done But I want to sort these records as per $usrId (HowTos)