diff options
author | ache <ache@ache.one> | 2017-06-13 19:26:32 +0000 |
---|---|---|
committer | ache <ache@ache.one> | 2017-06-13 19:26:32 +0000 |
commit | 7789c00e8592f2686392838416882f62963ca570 (patch) | |
tree | d2dd24463bc0962b30a1191727b6f91e748a8d87 | |
parent | rename of img2pdf to imgs2pdf (diff) |
Usefull bash sed-like remplace
-rwxr-xr-x | imgs2pdf.sh | 2 |
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; |