#!/bin/bash
p=$(echo -e "GETPIN\nBYE\n" | pinentry | grep D)
echo "${p:2}"