title: What is the shell script instruction to divide a file with sorted lines to small files?
body: <p>I have a large text file with the next format:</p>
  
  <pre><code>1 2327544589
  
  1 3554547564
  
  1 2323444333
  
  2 3235434544
  
  2 3534532222
  
  2 4645644333
  
  3 3424324322
  
  3 5323243333
  
  ...
  </code></pre>
  
  <p>And the output should be text files with a suffix in the name with the number of the first column of the original file keeping the number of the second column in the corresponding output file as following:</p>
  
  <pre><code>file1.txt:
  
  2327544589
  
  3554547564
  
  2323444333
  
  file2.txt:
  
  3235434544
  
  3534532222
  
  4645644333
  
  file3.txt:
  
  3424324322
  
  5323243333
  
  ...
  </code></pre>
  
  <p>The script should run on Solaris but I'm also having trouble with the instruction awk and options of another instruccions like -c with cut;  its very limited so I am searching for common commands on Solaris. I am not allowed to change or install anything on the system. Using a loop is not very efficient because the script takes too long with large files. So aside from using the awk instruction and loops, any suggestions?</p>