Ricky73,
Keep in mind that the shell of ESXi is not a traditional linux shell, it's a busybox shell. There is no concept of bash, but you still have basic shell (sh) functionality.
ls -l /bin/sh
lrwxrwxrwx 1 root root 35 Nov 4 23:26 /bin/sh -> /usr/lib/vmware/busybox/bin/busybox
It is also possible to create and run a script, but you need to specify what shell to be used in the script similar to this:
[root@esx-01:~] cat test.sh
#!/bin/sh
echo test
[root@esx-01:~] chmod +x test.sh
[root@esx-01:~] ./test.sh
test
Good luck!
Lars