I’m trying to map my Mac iBooks keyboard to mimic the Happy Hacking keyboard (CapsLock = Control, Fn + Tab = CapsLock, and swap delete and ). While this was trivial to accomplish on Windows Vista, I’m having a hard time on the Mac. So far the closest reference I found is Keyboard Remapping in Mac OS X (10.4) but it doesn’t include a list of keys and the hex numbers that are associated with them. Until I find that list, I’ll just be content with the CapsLock be mapped as Control, which cna be done in the System Preferences under Keyboard and Mice.
Ever wondered how to exclude a string from grep? Last week I decided to dig until I find the answer, as I had to find a “lost” DB2 script in a pile of archives. It turns out that grep has a feature called “grep for all except”. Finally found that on a mailing list archive of COLUG. Here is how it works:
grep pattern1 file | grep -v pattern2