#!/bin/bash # svg2pdf < convert svg to pdf with inkscape # required command -v inkscape >/dev/null 2>&1 || { echo "I need inkscape installed." ; exit 1; } # action # inkscape arc.svg --export-pdf=arc.pdf while [ $# -gt 0 ]; do file=$(readlink -f "$1") # abs link baseext=$(basename "${1}") # file.ext base="${baseext%.*}" # file dir=$(dirname "${file}") # directory echo "$dir/$base".pdf inkscape "$file" --export-pdf="$dir/$base".pdf shift done