1
0
mirror of https://github.com/sahinakkaya/dotfiles.git synced 2025-04-15 15:12:06 +02:00
dotfiles/scripts/cpyout

12 lines
171 B
Bash
Executable File

#!/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