Skip to content

Instantly share code, notes, and snippets.

@spaceman-cb
Last active May 15, 2018 23:58
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 spaceman-cb/5fac1139bf557859f36cfec6163cfc79 to your computer and use it in GitHub Desktop.
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
# 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