Skip to content

Instantly share code, notes, and snippets.

@ka-ka-xyz
Created June 25, 2018 02:28
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 ka-ka-xyz/196ba947405c87e4cfc192afadef80da to your computer and use it in GitHub Desktop.
Save ka-ka-xyz/196ba947405c87e4cfc192afadef80da to your computer and use it in GitHub Desktop.
#!/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