Skip to content

Instantly share code, notes, and snippets.

@feklee
Last active November 14, 2020 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feklee/5e6e19b08acfa581de903408a8b2ea83 to your computer and use it in GitHub Desktop.
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
#!/bin/bash
# Felix E. Klee <felix.klee@inka.de>
# 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