How Do I Export vCards from Apple Contacts using AppleScript?

First, why use a Bash script that simply contains an AppleScript?
I would just use an AppleScript in an Execute an AppleScript action.

IAC, we can't help unless you describe the problem in detail.
Exactly what is not working? Where is it failing?
It is best to upload your macro with the script in it.

Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?