Just for anyone interested, This is super easy to do now, no need for scripts.
It's basically Rob's method but I thought I'd explain further:
1. get any semi-decent camera capable of HD video
2. make your own tracking targets or simply shoot a high contrast scene that is easily tracked. Film the shake movements you want in realtime. The actual camera move (pan, zoom, track etc) can be added separately.
3. import footage to AE and apply 3D camera tracker with points.
4. select group (or all points)Â
5. right click on points and create null and camera. make null 3D
6. Camera will have wiggle keys applied. Parent camera to null and use null as controller for moves