how to split a text file on the contents of the first column

data file (cisco.macs):

   5    000c.29e8.72fd    DYNAMIC     Gi1/0/2
   5    000c.29f4.61be    DYNAMIC     Gi2/0/1
   5    000c.29fe.a034    DYNAMIC     Gi2/0/2
   7    000c.290f.e173    DYNAMIC     Gi2/0/3
   8    000c.290f.e173    DYNAMIC     Gi2/0/3
   9    000c.290f.e173    DYNAMIC     Gi2/0/3
   9    000c.2921.b864    DYNAMIC     Gi1/0/5
   9    000c.2937.7bd8    DYNAMIC     Gi2/0/5
....................<snip>....................

puts the mac addresses into files named 5, 7, 8, 9:

sort <cisco.macs | awk '{print $2 >$1}'