Applescript is not Bash and nor does it follow the same structure or solve things that you'd use shell scripting for.
Bash refers to the shell most Unix distributions have - the Bourne Again Shell - BASH. You are trying to talk about shell scripting (.sh) but call it Bash.