#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2017 Christopher Bratusek		#
#							#
#########################################################

case ${1} in

	--help | -h | "")
		bashstyle-help -a "Christopher Roy Bratusek" -e "nano@jpberlin.de" -h "http://www.nanolx.org/"\
			-l "GNU GPL v3" -n "batch" -s "batch-perform actions on files" -v "${BSNG_VERSION}" -y "${BSNG_YEAR}"\
			-o "pattern:*.png|pattern matching files"\
			-o "action:rm -f|action to perform on matching files"
	;;

	* )
		find . -type f -iname '*.'"${1}"'' -exec "${@:2}" {} \; ;
	;;

esac
