#! /bin/bash # assuming gpg is installed password="$1" filename="$2" gpg --symmetric --cipher-algo AES256 --passphrase "$password" "$filename"