(People interested in this program may also be interested in MPECSort, which provides a way to get elements from current MPECs and filter them based on assorted criteria. They may also be interested in the integrat software for integrating mpcorb-style files to any desired epoch.)
mpcorbx 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/Windows software. (Though properly written software should be able to handle the absence or presence of carriage returns.) Also, or instead, one can use mpcorbx filter the file according to certain parameters.
You can click here for the C source file (about 9 KBytes) or you can click here for the DOS/Windows executable (about 23 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 n(.5 Select objects with mean motion less than .5 deg/day A)181 Ascending node (Omega)>181 degrees p)43 Argument of perihelion (omega)<43 degrees 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 19 2012 version
Which should pretty well sum it up. I'll mention that the command line arguments can be in any order, combined as desired.