Use bash script instead -- much easier!
Update