aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-01-25 20:49:24 +0100
committerVG <vg@devys.org>2016-01-25 20:49:24 +0100
commit846f5ff2705fc38ea1b0ba74d2af54e2fb5a4579 (patch)
treec8a93a6a52066d039f90a550ac642bbbfdcbcf6e
parent552252a172eebe758f2c87131c4da33c6a3cc4d5 (diff)
downloadbulkrename-846f5ff2705fc38ea1b0ba74d2af54e2fb5a4579.tar.gz
bulkrename-846f5ff2705fc38ea1b0ba74d2af54e2fb5a4579.tar.bz2
bulkrename-846f5ff2705fc38ea1b0ba74d2af54e2fb5a4579.zip
reduce commands dependency (use wc instead of stat since already required)
-rwxr-xr-xbulkrename2
1 files changed, 1 insertions, 1 deletions
diff --git a/bulkrename b/bulkrename
index 88cb363..b030fa4 100755
--- a/bulkrename
+++ b/bulkrename
@@ -34,8 +34,8 @@ sed -i -- 's/\([\\"$`]\)/\\\1/g;' "${namebase}.1" "${namebase}.2"
| xargs -d"\n" -L2 echo 'mv -i --') \
> "${namebase}.sh"
+if [ "$(wc -c < "${namebase}.sh")" -ne 0 ] ; then
-if [ "$(stat --printf="%s" "${namebase}.sh")" -ne 0 ] ; then
"$EDITOR" "${namebase}.sh"
sh -e -- "${namebase}.sh"
echo "bulkrename is done"