#!/bin/bash if [ -z "TOTP" ]; then echo "please export TOTP with your authentication code" exit 1 fi OTP=$(oathtool --base32 --totp "$TOTP") echo "$OTP" | xsel -ib echo "$OTP"