Skip to content

Instantly share code, notes, and snippets.

@lasta
Last active August 29, 2015 14:01
Show Gist options
  • Save lasta/b2ad53ba1e445d5d9206 to your computer and use it in GitHub Desktop.
Save lasta/b2ad53ba1e445d5d9206 to your computer and use it in GitHub Desktop.
Convert OS X style path to Windows on Parallels style path.
#!/bin/bash
set -euo pipefail
# pwd : ~/path/to/dir
# dir : \\psf\path\to\dir
osx_dir_name=`pwd`
win_dir_name=`echo ${osx_dir_name} | cut -f4- -d "/" | sed -e 's/\\//\\\/g'`
echo "\\\\psf\\${win_dir_name}" | pbcopy
unset osx_dir_name
unset win_dir_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment