#!/bin/bash -p
# © 2009-2013 Gert-jan Los <los@hacke.rs>
# License: GPL v3 or later (http://www.gnu.org/licenses/gpl-3.0.txt)

if [ $# -gt 0 ] ;then
	q="'"
	bs='\'
	for x in "${@//$q/$q$bs$q$q}" ;do echo -n "'$x' " ; done |
	{ /usr/bin/batch 2>&1 || exit $? ; } |
	grep -v \
		-e '^warning: commands will be executed using /bin/sh$' \
		-e '^job [0-9]\+ at ' \
		1>&2
	exit 0
else
	exec /usr/bin/batch
fi
