I have a plugin that generates and copies to the clipboard a ready-to-paste command. For now I open a new terminal, paste the command and execute it. I want to write a script that automatically opens a new terminal and runs that command using the clipboard as input.
I tried to use xclip but can't figure out how to pipe its output to gnome-terminal, and all of the threads I saw focus on the opposite problem: saving command output to clipboard which is NOT what I want to do.
What I tried:
xclip -se c -o | gnome-terminal -e
It says "Failed to parse arguments: Missing argument for -e". So at the very least I have a syntax problem.
I have a feeling that I might not be approaching this problem the right way. Complete noob here, so the more details the better!