public override void Execute(string[] args, StreamWriter output) { if (args == null || args.Length < 1) { Write(output, "Insufficient arguments"); return; } CommandManager manager = CommandManager.GetIntance(); string[] lines = ReadLinesFromFile(args[0]); foreach (string line in lines) { string[] argsCommand = CommandUtil.TokenizerArgs(line); ICommand command = manager.GetCommand(argsCommand[0]); string[] reduce = new string[argsCommand.Length - 1]; Array.Copy(argsCommand, 1, reduce, 0, argsCommand.Length); command.Execute(reduce, output); Write(output, "\n"); } Write(output, "Batch executed"); }