Tapp was one of the first applications I wrote for the iPhone, before a terminal app was publicly available. It allows you to enter commands, one per line, and execute them. The results display on a text screen after. There are two modes: edit mode, where you can add and edit commands, exec mode where you execute them.
To save yourself on-screen typing, add a .tapp file into /var/root with commands, one per line. Tapp reads in .tapp when it launches and writes it out again on quit.