Skip to content

Instantly share code, notes, and snippets.

@starise
Forked from Plazmaz/windir.sh
Created September 24, 2017 11:42
Show Gist options
  • Save starise/541eaa6843d42511a2e6b2bd279bcef6 to your computer and use it in GitHub Desktop.
Save starise/541eaa6843d42511a2e6b2bd279bcef6 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