Let's say I run
inxi -C and want to output both
inxi -C and the result of that command (CPU information) to pastebin. How do I do this in the most efficient way?
Why, you can do that with the handy new
forexample program (docs, unit tests) assuming the command to be run is something
spawn can handle; otherwise, you'd need to write this tool directly in the shell itself.
$ CLIPBOARD=cat forexample echo hi $ echo hi hi $ $
pbcopy so either change the code or once
forexample is properly setup in
expect installed) try something like
CLIPBOARD='xclip -in' forexample inxi -C