Why not rewrite your script to do what you want?