I can get the contents of the clipboard in the format of HTML on linux by using xclip
xclip -selection clipboard -o -t text/html
How can I do the same thing on Mac OS X? I heard that I could use pbpaste
, but none of the following command worked for me.
pbpaste
pbpaste -Prefer rtf
Sometimes it just output plain text, and sometimes it output nothing.
Is there any way to do it?