Skip to content

Instantly share code, notes, and snippets.

@Plazmaz
Last active June 15, 2019 01:34
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Plazmaz/7e2e0832eba178c7cfc48e4236bc056b to your computer and use it in GitHub Desktop.
Save Plazmaz/7e2e0832eba178c7cfc48e4236bc056b to your computer and use it in GitHub Desktop.
This is a simple function for converting windows paths (C:\Users\Test\t.txt) to their WSL equivalent (/mnt/c/Users/Test/t.txt)
# !/bin/bash
function windir() {
echo "/mnt/$1" | sed -e 's/\\\\/\//g' -e 's/\b\(.\):/\L\1/g'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment