mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-11-10 02:59:37 +01:00
12 lines
171 B
Plaintext
12 lines
171 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
tmpfile=$(mktemp /tmp/cmd-output.XXXXXX)
|
||
|
trap 'rm "$tmpfile"' 0 1 15
|
||
|
echo "\$ $@" | tee $tmpfile
|
||
|
eval "$@" |& tee -a $tmpfile
|
||
|
|
||
|
|
||
|
cat $tmpfile | xclip -sel c
|
||
|
|
||
|
|