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?

bumped to the homepage by Community 8 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • 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

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

  • 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

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.