Developing this answer, which offers a way to copy a given line from standard output to MacOS clipboard – I wonder if there's a way to do the same for interactive commands?For example:
~ bc -l>>> 123+446>>> 56*784368
– is there a way to run bc -l
so that after 12+34↵
– the value 46
would be in MacOS clipboard, and after 56*78↵
– clipboard would contain 4368
?