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' ) |