Last active
November 14, 2020 02:02
-
-
Save feklee/5e6e19b08acfa581de903408a8b2ea83 to your computer and use it in GitHub Desktop.
Copies the path in Windows of a path in my Linux virtual machine to the clipboard
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 | |
# Felix E. Klee <[email protected]> | |
# Usage info | |
show_help() { | |
cat << EOF | |
Usage: ${0##*/} PATH | |
Copies the path in Windows of PATH (in my Linux virtual machine) to | |
the clipboard. | |
EOF | |
} | |
if [ "$#" -ne 1 ]; then | |
show_help >&2 | |
exit 1 | |
fi | |
echo -n $(winpath "$1") | xclip -selection clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment