Created
June 25, 2018 02:28
-
-
Save ka-ka-xyz/196ba947405c87e4cfc192afadef80da to your computer and use it in GitHub Desktop.
Inspired from winpath,sh ( https://gist.github.com/aseering/a06219e74c7f96ccea5ec65d5b2483b5 )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Inspired from https://gist.github.com/aseering/a06219e74c7f96ccea5ec65d5b2483b5 | |
## Wrap result to handling space containing path | |
## example | |
## winpath.sh "E:\Apache Software Foundation" | xargs ls -al | |
echo "$@" | sed -e 's|\\|/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/mnt/\L\1\E/\2|' -e 's/^/"/;s/$/"/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment