The msfconsole -x command can be used to execute single-line commands directly from the terminal rather than working within an interactive console. This makes it an excellent feature for use within Bash shell scripting. As both NSE scripts and msfconsole -x can be executed from the Bash terminal, a shell script can easily be written to combine the two functions together.