Skip to content

Instantly share code, notes, and snippets.

@spaceman-cb
spaceman-cb / Automator: Open Network Path.sh
Last active May 15, 2018
# Allows you to select an smb text link & right click "Open Network Path" to open it # in a new finder window
View Automator: Open Network Path.sh
# 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' )