Let me describe what I want to achieve. We are using two-factor authentication and I would like to create script which will generate TOTP token for me and it will paste it to let's say Firefox on some shortcut press. So I created a script like this
#!/bin/sh echo $(oathtool --totp some-seed)
However if I assign shortcut for this script it's not able to print the PIN anywhere else other than the console. Ok, I know it was naive thing to try but what would be the best to achieve my goal?