
sendLine("\""+args[i]+"\",\n",os);
</BUG>
}
<BUG>sendLine("};",os);
</BUG>
int b;
<BUG>InputStreamReader fis = new FileReader(file);

while ((b=fis.read()) != -1){
</BUG>
os.write(b);

String host=args[0];
String portString = args[1];
String file=args[2];
int port=Integer.parseInt(portString)+1;// convert to telnet port
System.out.println("Connecting to BSH server on "+host+":"+portString);
try (Socket sock = new Socket(host,port);
InputStream is = sock.getInputStream();
OutputStream os = sock.getOutputStream()) {
SockRead sockRead = new SockRead(is);
sockRead.start();
sendLine("bsh.prompt=\"\";", os);// Prompt is unnecessary
sendLine("String [] args={", os);
for (int i = MINARGS; i < args.length; i++) {
sendLine("\"" + args[i] + "\",\n", os);
