Skip to content

Instantly share code, notes, and snippets.

View DrAltay's full-sized avatar

Altay DrAltay

View GitHub Profile
@DrAltay
DrAltay / anti_watermark_pdf.sh
Created April 17, 2020 14:58
Unlock and edit a PDF with a text editor
INPUT_FILE=$1
# Check if target file is set
if [ -z "$2" ]
then
# Ask confirmation before overwriting the existing file
read -p "Overwrite the existing ${INPUT_FILE} (y/N)? "
if [[ $REPLY =~ ^[Yy]$ ]]
then
TARGET_FILE=$INPUT_FILE
else