Manual:Edit.php

Details
edit.php file is a maint-scripts>Special:MyLanguage/Manual:Maintenance scripts|maintenance script to edit an article from the command line

Options
If the specified user does not exist, it will be created. If no username has been provided, the edit will be attributed to user "Maintenance script", created if needed. The text for the edit will be read from stdin.

Examples
The above will edit the page  (marking the edit minor) so it contains the contents of the file file_containing_wikitext using the edit summary Quick edit.

The above will take the text of the page  from your wiki, replace  every occurrence of the word foo with the word bar, and save the result back to the page. You can do many complex text transformations of page text this way; see your unix manual's entry for sed.