Terminal won't open after brew upgrade (dyld library not loaded)
Install iTerm.app You can set up a profile that you can set the start up program do be /bin/bash

Or create a new admin user and use that to restore or reinstall files. I think you might be able to use dscl from that user to change the original users' shell