Skip to content

Instantly share code, notes, and snippets.

@tobym
Created February 11, 2013 21:53
Show Gist options
  • Save tobym/4757945 to your computer and use it in GitHub Desktop.
Save tobym/4757945 to your computer and use it in GitHub Desktop.
pwdx for mac, updated
#!/bin/bash
lsof -a -p $1 -d cwd -Fn | tail -1 | sed 's/.//'
@tobym
Copy link
Author

tobym commented Feb 11, 2013

This version fixes the bug that broke output when the path had a space in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment