4

I am trying to access the clipboard but there is no pbcopy or pbpaste command. Is there an alternative to this command? how can i access the clipboard from the command line?

  • If you advise which terminal this is for. Termux has a command line access to clipboard via termux-api – user218076 Jul 8 '18 at 9:43
0

For terminal, you can use Android Terminal Emulator (ATE). Assuming you have copied something to the clipboard, you can long-press in the ATE, and you will see a Paste command.There is also a Select text command.

enter image description here

| improve this answer | |
  • 1
    But i am wanting to use a command, because if i can access the clipboard with a command then i can more easily integrate clipboard access into the program that i am writing. – kyle k Aug 20 '13 at 5:50
  • @kylek Is that a Java program? – geffchang Aug 20 '13 at 12:12
  • No, it is for a C program and a Python program, for C I use this function system("pbpaste"); and for Python i use this os.system("pbpaste"). But i am starting to learn Java. – kyle k Aug 20 '13 at 21:59
  • obviously when using 'system' you are running an external program wnd what language you are in is not relevant... the question of what terminal you are in remains... since you said command line are you in adb, or native shell or another app like termux? not that I know the answer... came here for answer re termux – nhed Oct 9 '19 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.