LextEdit provides a way to automate execution of commands.  This can allow you to run a command multiple times and stop on a defined set of terms.