Last active
May 15, 2018 23:58
-
-
Save spaceman-cb/5fac1139bf557859f36cfec6163cfc79 to your computer and use it in GitHub Desktop.
# Allows you to select an smb text link & right click "Open Network Path" to open it # in a new finder window
This file contains hidden or 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
# set `pass input` to `as arguments` | |
# Allows you to select an smb text link | |
# and right click "Open Network Path" to open it | |
# in a new finder window | |
network_path_to_open=$* | |
network_path_to_open=$(echo $network_path_to_open | sed 's#\\\\#smb://#' ) | |
network_path_to_open=$(echo $network_path_to_open | tr \\ /) | |
network_path_to_open=$(echo $network_path_to_open | sed 's#<##g' ) | |
network_path_to_open=$(echo $network_path_to_open | sed 's#>##g' ) | |
network_path_to_open=$(echo $network_path_to_open | sed 's#"##g' ) | |
open -n $network_path_to_open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment