https://tech.iprock.com/archives/11853
Link: Copy the Current Path from Terminal to the Clipboard in Mac OS X