Skip to content

Instantly share code, notes, and snippets.

@tonidy
Created March 31, 2013 14:00
Show Gist options
  • Save tonidy/5280667 to your computer and use it in GitHub Desktop.
Save tonidy/5280667 to your computer and use it in GitHub Desktop.
p2u is small script which convert windows path to unix path. It may useful in msys app when environment variable (contain path) set in Windows path.
# put this in .bashrc/.bash_profile file
# the idea is taken from http://stackoverflow.com/a/13701495
# function to convert windows path to unix path
# USAGE: p2u $WINDOWS_PATH
p2u() {
local winpath=$1
echo "/$winpath" | sed 's/\\/\//g' | sed 's/://'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment