formatting textfile inside ksh script using awk not working

I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command.
I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the
the awk command statement shown here. Please help.

<<<contents of msgfile.txt>>>
$ cat msgfile.txt
Firstname1,Lastname1,Initial
Firstname2,Lastname2,Initial2
Firstname3,Lastname3,Initial3
Firstname4,Lastname4,Initial4
Firstname5,Lastname5,Initial5

<<<program code - this needs to be within ksh>>>
#!usr/bin/ksh

awk -F":" '{ print $1 "\t" $2 "\t" $3 }' msgfile.txt

<<<script output>>>
$ ksh tmail2.ksh
Firstname1,Lastname1,Initial
Firstname2,Lastname2,Initial2
Firstname3,Lastname3,Initial3
Firstname4,Lastname4,Initial4
Firstname5,Lastname5,Initial5

should be,

awk -F"," '{ print $1 "\t" $2 "\t" $3 }' msgfile.txt

because the columns are seperated by a comma.

Output:

Since i like using printf for formatting in awk , you can try this also,

awk -F"," '{printf"%-20s %-20s %-20s\n",$1,$2,$3}' msgfile.txt

Output:

Or:

{ IFS=',';printf "%s\t" $(<infile);printf "\n";}
# awk 'BEGIN{FS=",";OFS="\t"}{print $1,$2,$3}' file
Firstname1      Lastname1       Initial
Firstname2      Lastname2       Initial2
Firstname3      Lastname3       Initial3
Firstname4      Lastname4       Initial4
Firstname5      Lastname5       Initial5

Thanks for all the help! It works now.

Another way though your problem is solved using awk

$ tr ',' '\t' < msgfile.txt