1

I have some text in a file copied to the clipboard via command line and I then wish to paste this content to a website.

cat file | pbcopy 

/usr/bin/open -a "/Applications/Google Chrome.app" 'http://google.com/'

(1) How do I paste to say google (if it's even possible)?

(2) Is it possible to open a different website, tab x amount of times and then paste?

1 Answers1

1

For sending keystrokes to a graphical application from a command-line program you can use xdotool (you may need to install it first). See the answer by Gilles to the question "How to send keystrokes (F5) from terminal to a process?" on Unix & Linux.

AlexP
  • 10,455