This is a command-line utility for doing some very basic manipulation of the Minor Planet Center's MPCORB database. In particular, one can add carriage returns to make an 'mpcorbcr.dat' file, as required by some DOS editors. Also, or instead, one can filter the file according to certain parameters.
You can click here for the C source file (about 7 KBytes) or you can click here for the DOS/Windows executable (about 22 KBytes). It should compile nicely for other OSes.
If you run mpcorbx -?, or encounter an error, you'll get the following message:
'mpcorbx', run without command line arguments, will read in 'mpcorb.dat' and output 'mpcorbcr.dat' with carriage returns inserted. With command-line arguments added, one can filter the output to contain only specified objects. The constraints can be combined as desired. For example: a(1.3 a)1. Select only objects with a<1.3 AU and a>1 q)5.1 Select objects with q > 5.1 AU Q(8.1 e).7 Select objects with Q ( 8.1 and e > .7 P)1.6 Select objects with period greater than 1.6 years i)10 i(16 Select objects with i>10 degrees and i<16 H(10 N(1700 Select objects with H<10 and among the first 1700 objects O(19900810 Only objects last observed before 1990 August 10 d)K10K42Q Only provisional desigs after K10K42Q = 2010 KQ42 -ofiltered.txt Direct output to 'filtered.txt' (default is stdout) -impcz.txt Read input from 'mpcz.txt' (default is mpcorb.dat) Note the use of ( and ) instead of < or >. The latter are file redirection operators, so sadly, we can't use them here. When filtering, the output will default to being without carriage returns. Add a '-c' command line option to turn them back on. mpcorbx a)1.2 i(10 -c -orandom.txt would select objects with semimajor axes greater than 1.2 AU and inclinations less than ten degrees, and output them with carriage returns to the file 'random.txt'. See http://www.projectpluto.com/mpcorbx.htm for more information. Jun 7 2010 version
Which should pretty well sum it up. I'll mention that the command line arguments can be in any order, combined as desired.