From d5296cdb07bf6742fec3a4ec6faf9e7afa120f5c Mon Sep 17 00:00:00 2001 From: Cédric Picard Date: Mon, 25 Jan 2016 21:08:37 +0100 Subject: Fixed bug when using arguments instead of stdin --- bulkrename | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bulkrename b/bulkrename index a927f9b..e31f148 100755 --- a/bulkrename +++ b/bulkrename @@ -5,7 +5,8 @@ set -e -u if [ $# -ne 0 ] ; then - { for i in "$@" ; do printf "%s\n" "$i" ; done } | exec "$0" + { for i in "$@" ; do printf "%s\n" "$i" ; done } | "$0" + exit $? fi EDITOR="${EDITOR:-vi}" -- cgit v1.2.3