Great one-liner for a script to get the directory it resides in -
1 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
Linked from the stackoverflow page where I found this.
Had a problem recently: on a mac,
and
weren't transferring data to/from the GUI Command-C and Command-P (copy and paste).
After much consternation, the correct solution ended up being a system reboot. Problem solved. No, killing pboard didn't help.