I am trying to do an automated task using Actiona and I need to have the content of an HTML file to be copied into clipboard. Using the clipboard coding facilities inside Actiona is not a solution while it only uses text DataType (mime type) and I need it to be copied as HTML (text/html). I'm wondering if I can do it by running a system command in one of the steps.

  • Since this is an Q&A site, all answers should be posted in answer section only. For now, I have rolled back your edit. If you found the answer by kabr8 helpful, you can mark that as accepted by clicking on tick mark on the left of the answer.
    – Kulfy
    Apr 18 '20 at 11:16

I found a similar question Copy the contents of a file into the clipboard without displaying its contents - Unix & Linux :

Install xclip using:

sudo apt install xclip

To copy the script:

xclip -sel c < yourfile.html

To copy the text (suggested by KJA in a comment):

xclip -t text/html -sel c < filename.html
  • Thanks for the quick reply This does not add the file as text/html I found the following solution xclip -t text/html -sel c < filename.html
    – KJA
    Apr 18 '20 at 5:54
  • OK Nixe to knowledge
    – kabr8
    Apr 18 '20 at 8:29
  • This works very well at the moment and is best choice among others
    – KJA
    Jul 3 '20 at 19:36

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.