Formatting port scan output

I need to format port scan output for input into another app.

This is what I have;

1025/tcp
1521/tcp
2301/tcp
2381/tcp
3191/tcp
3389/tcp
5938/tcp
47001/tcp
54321/tcp
21/tcp
80/tcp
135/tcp
139/tcp
445/tcp
1025/tcp

I want to chop the "/tcp" off, run it through uniq so that I only have the unique ports and then stack the output like below comma separated

1521, 2301, 2381, 3191, 3389, 5938, 47001, 54321, 21

Thanks!

nawk -F/ '{a[$1]}END{for(i in a) printf("%c%s",j++?OFS:"", i);print ""}' OFS=, myFile
$ cut -d'/' -f1 < sample4.txt | sort -n | uniq -u | tr "\n" ","
21,80,135,139,445,1521,2301,2381,3191,3389,5938,47001,54321,

Perfect, thanks

Another approach:

awk -F\/ '{s=s?s ", " $1:$1}END{print s}' file