Leading white spaces

Hi,

I am having problem in deleting the leading spaces:-

cat x.csv
baseball,NULL,8798765,Most played
baseball,NULL,8928192,Most played
baseball,NULL,5678945,Most played
cricket,NOTNULL,125782,Usually played
cricket,NOTNULL,678921,Usually played

$ nawk 'BEGIN{FS=","}!a[$1] {print;a[$1]++;next}{print "\t"FS$2FS$3FS$4}' x.csv >y.csv
$ cat y.csv
baseball,NULL,8798765,Most played
        ,NULL,8928192,Most played
        ,NULL,5678945,Most played
cricket,NOTNULL,125782,Usually played
        ,NOTNULL,678921,Usually played

$  sed 's/^[ \t]*//' y.csv > z.csv
$ cat z.csv
baseball,NULL,8798765,Most played
        ,NULL,8928192,Most played
        ,NULL,5678945,Most played
cricket,NOTNULL,125782,Usually played
        ,NOTNULL,678921,Usually played

$ uuencode z.csv z.csv | mailx a.com

when i send it through mail to my personal mail id I can see a box sign in the csv sheet in windows..
can somebody please help me to resolve this
Thanks

You add the tabs with the nawk command and trying to remove them with the sed command?

Remove the first tab en fieldseparartor in your second print statement:

nawk 'BEGIN{FS=","}!a[$1] {print;a[$1]++;next}{print $2FS$3FS$4}' x.csv >y.csv

Thanks Franklin