Skip to content

Instantly share code, notes, and snippets.

@1kastner

1kastner/linuxify

Last active Oct 4, 2017
Embed
What would you like to do?
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
You can’t perform that action at this time.