The success of the conversion probably will depend to a large degree on what it is that you're doing.
I remember thinking I should do the same thing. From an old FAQ on perl:
How can I convert my shell script to Perl? ...
Actually, there is no automatic machine translator. Even if there were, you wouldn't gain a lot, as most of the external programs would still get called. It's the same problem as blind translation into C: you're still apt to be bogged down by exec()s. You have to analyze the dataflow and algorithm and rethink it for optimal speedup. It's not uncommon to see one, two, or even three orders of magnitude of speed difference between the brute-force and the recoded approaches.
This is not to say that you can't or shouldn't, only that you may need to think about things. Sort of like "render unto the shell the things which are the shell's" (with apologies for the paraphrase to the Dictionary of Cultural Literacy
Best wishes ... cheers, makyo
( edit 1: typo )