New Command script

Brian Hawkins <brianhks-BYHubErIwDGZvNlLnfxc/[email protected]>
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[email protected]>
I have a new script I would like to have added to the command set. 
It is called execcwd.  It executes a command using bsh.cwd as the 
current working directory.

See attached file.

Thanks
Brian
execcwd.bsh (text/plain, 394 B)
/**
	Start an external application using the Java Runtime exec() method.
	Display any output to the standard BeanShell output using print().
*/

bsh.help.exec = "usage: execcwd( String arg )";

execcwd( String arg ) 
{
	this.proc = Runtime.getRuntime().exec(arg, null, bsh.cwd);
	this.din = new DataInputStream( proc.getInputStream() );
	while( (line=din.readLine()) != null )
		print(line);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.