This script is modeled after tee
(see man tee
).
It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable
$ date | cb
# clipboard contains: Tue Jan 24 23:00:00 EST 2017
# clipboard retained from the previous block
$ cb
Tue Jan 24 23:00:00 EST 2017
$ cb | cat
Tue Jan 24 23:00:00 EST 2017
$ cb > foo
$ cat foo
Tue Jan 24 23:00:00 EST 2017
$ date | cb | tee updates.log
Tue Jan 24 23:11:11 EST 2017
$ cat updates.log
Tue Jan 24 23:11:11 EST 2017
# clipboard contains: Tue Jan 24 23:11:11 EST 2017