mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2025-07-04 03:14:57 +03:00
Add new scripts
This commit is contained in:
11
scripts/cpyout
Executable file
11
scripts/cpyout
Executable file
@ -0,0 +1,11 @@
|
||||
#!/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
|
||||
|
||||
|
Reference in New Issue
Block a user