#!/bin/bash # apt install ocrmypdf if [ "$1" != "" ]; then nice -20 ocrmypdf --redo-ocr --pdfa-image-compression lossless --output-type pdfa-2 "$1" "$1" else echo "No filename given" fi