Earlier quoted context omitted.
If you're using Readline (most Bash or similar shells do), then C-x C-e will invoke the editor, and you can paste the output into that. Pray for no escape, bang, or control sequences. (Alternatively: "r! cat -D" will read into a vim session.) Examine the output, trim the unwanted / dangerous bits, and run (or save to a file/script). Since I run what are ... generously ... considered "bash one-liners" all the time, th…
> :r! cat -D Alternatively, call a utility that can read the clipboard directly. For Xorg: :r! xsel -b For Wayland: :r! wl-paste
I do this frequently on Android via Termux, ssh'ing to remote hosts.