Skip to content

Instantly share code, notes, and snippets.

@1kastner
Last active October 4, 2017 10:10
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 1kastner/723a52f352c3eead42988c26b4ade5d0 to your computer and use it in GitHub Desktop.
Save 1kastner/723a52f352c3eead42988c26b4ade5d0 to your computer and use it in GitHub Desktop.
linuxify() {
windowspath=$1
temppath="$(echo $windowspath | sed -E 's/([A-Z]):/\/mnt\/\L\1/g')" # C: -> /mnt/c, E: -> /mnt/e
temppath="$(echo $temppath | sed 's/\\/\//g')" # backslash -> forward slash
linuxpath=$temppath
echo $linuxpath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment