I'd like to do something like
openssl enc -d -aes256 -in somefile | less
openssl requires a password from stdin. and this gets all messed up when less is involved.
Is there a way to take the output from an interactive command (like openssl asking for a password) and pipe the output into less?
Or is there a better technique using a bash script?
You can try this:
But this doesn't look secure.
I have not tried running
opensslthis way, but in case it is too verbose and if previous code is not going to work then you can always try using expect. Here's an example: