rapid7/metasploit-framework — pull request #814 by kernelsmith (2012-09-20 17:28:07+00:00)
Title: adds -s <string> Execute the specified string as console commands to msfconsole

for convenience when you don't need/want a full resource file, you just
want to run something quick

example usage:

# say you have a saved config ready to go on load
./msfconsole -s 'exploit -j'

# you can run multiple commands too
./msfconsole -s 'set ConsoleLogging true\nshow options'

commands run with -s run last, after all other processing such as saved config and resource files