Skip to content

Instantly share code, notes, and snippets.

@Maki-Daisuke
Last active August 29, 2015 14:05
Show Gist options
  • Save Maki-Daisuke/377eae4aaeb1110de183 to your computer and use it in GitHub Desktop.
Save Maki-Daisuke/377eae4aaeb1110de183 to your computer and use it in GitHub Desktop.
最近仕事の関係で、「\\ホスト名\ファイルパス」って書かれたメールが頻繁にやってくるようになったので、こんなone-linerをコマンド化した。 超はかどる。 ちなみに、OS X用。
#!/bin/sh -x
mkdir -p /usr/local/bin
cd /usr/local/bin
curl -L 'https://gist.githubusercontent.com/Maki-Daisuke/377eae4aaeb1110de183/raw/93a0072929084f6959565dc2516ecde34ad79f00/smbopen' > smbopen
chmod +x smbopen
#!/usr/bin/env perl
exec "open", map{ s|^\\\\|smb://| and s|\\|/|g; $_ } @ARGV;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment