Last active
August 15, 2018 12:50
-
-
Save hyrsky/62f773e35e32fc5d83ecfd916e3e12da to your computer and use it in GitHub Desktop.
xclip on Windows subsystem for Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Purpose of this script is to eats all command line parameters and error messages | |
# Location: /usr/local/bin/xclip | |
# Just exit if -o flag is set | |
while [[ $# -gt 1 ]]; do | |
case "$1" in | |
-o ) exit 0 ;; | |
* ) echo $1; shift ;; | |
esac | |
done | |
input=`cat -` | |
echo "$input" | clip.exe 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment