Index: uspace/app/bdsh/cmds/builtins/batch/batch.c
===================================================================
--- uspace/app/bdsh/cmds/builtins/batch/batch.c	(revision 7eaeec113ff74c8737354abec7d5185097de8278)
+++ uspace/app/bdsh/cmds/builtins/batch/batch.c	(revision e965decd7db24e719c0d152660a29cffca98c753)
@@ -29,4 +29,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdbool.h>
+#include <errno.h>
 #include "config.h"
 #include "util.h"
@@ -44,5 +46,5 @@
 	if (level == HELP_SHORT) {
 		printf(
-		"\n  batch [filename]\n"
+		"\n  batch [filename] [-c]\n"
 		"  Issues commands stored in the file.\n"
 		"  Each command must correspond to the single line in the file.\n\n");
@@ -54,5 +56,7 @@
 		"  separate groups of commands. There is no support for comments,\n"
 		"  variables, recursion or other programming constructs - the `batch'\n"
-		"  command is indeed very trivial.\n\n");
+		"  command is indeed very trivial.\n"
+		"  If the filename is followed by -c, execution continues even if some\n"
+		"  of the commands failed.\n\n");
 	}
 
@@ -65,4 +69,5 @@
 {
 	unsigned int argc;
+	bool continue_despite_errors = false;
 
 	/* Count the arguments */
@@ -72,4 +77,9 @@
 		printf("%s - no input file provided.\n", cmdname);
 		return CMD_FAILURE;
+	}
+
+	if (argc > 2) {
+		if (str_cmp(argv[2], "-c") == 0)
+			continue_despite_errors = true;
 	}
 
@@ -99,4 +109,8 @@
 					rc = process_input(&fusr);
 					/* fusr->line was freed by process_input() */
+					if ((rc != EOK) && continue_despite_errors) {
+						/* Mute the error. */
+						rc = EOK;
+					}
 				}
 				if (rc == 0 && c != EOF) {
