aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-06-13 19:26:32 +0000
committerache <ache@ache.one>2017-06-13 19:26:32 +0000
commit7789c00e8592f2686392838416882f62963ca570 (patch)
treed2dd24463bc0962b30a1191727b6f91e748a8d87
parentrename of img2pdf to imgs2pdf (diff)
Usefull bash sed-like remplace
-rwxr-xr-ximgs2pdf.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/imgs2pdf.sh b/imgs2pdf.sh
index a3c9a19..ce645d1 100755
--- a/imgs2pdf.sh
+++ b/imgs2pdf.sh
@@ -26,5 +26,5 @@ fi
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$out" `ls -v | egrep \.pdf$`
for img in *."$ext" ; do
- rm "${img:0: $(( -1 + -${#ext} )) }.pdf"
+ rm "${img//$ext/pdf}"
done;