Manual:FetchText.php

Details
fetchText.php file is a maint-scripts>Special:MyLanguage/Manual:Maintenance scripts|maintenance script to fetch a particular revision text from an old_id.

Usage
Enter a text id to the command line followed by a newline, and it will output a string containing the following in order:
 * textid
 * length of text (-1 on error = failure to retrieve/unserialize/gunzip/etc)
 * text (may be empty)

The text string itself is *not* followed by newline.

You can exit from the script typing.