Works in shell but not script UNIX

ok i have a very simple UNIX script

#!/bin/bash
TERM=ansi;export TERM
PFCMARK=25;export PFCMARK
umask 0000
PFUMASK=000;export PFUMASK

#run for filepro menus and exectuables
echo "###########File Modification Log.############\r" > "/public/appl-fp$(date +%m-%d-%Y).txt"
find /appl/fp/ -mtime -1 -exec ls -l {} >> "/public/appl-fp$(date +%m-%d-%Y).txt" 

now the script runs all the way through using sh script, but it names the file litterly as "appl-fp$(date +%m-%d-%Y).txt"
now if i run those same commands from the shell, it names the file correctly as "appl-fp06-08-2010.txt"

has anyone ran into this, or can anyone tell me why it is freaking out and not running the same way in the script as it does in the shell?

In short, sh does not equal bash (even though /bin/sh might point to /bin/bash), or, as man bash states:

If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well.

However, what happens if you skip some of the quotes, e.g.:

FILE=/public/appl-fp$(date +%m-%d-%Y).txt
echo "###########File Modification Log.############\r" > $FILE
find /appl/fp/ -mtime -1 -exec ls -l {} >> $FILE

I actually tried changing the beginning different ways and it does nothing to help...
#!/bin/sh
or
#!/bin/bash
#!/bin/sh
or
#!/bin/sh
#!/bin/bash

its funny because i run all kinds of date backup scripts in linux and it is just fine with those commands. my first attempt actually was as you suggested with the path stored in a variable, it just comes up with this error message stating that it cannot find the variable!

i am just getting familiar with the unix machine, but small things like this are driving me nuts. (specially since vim points to vi, it took me a few minutes to figure that out...)

is there any other reasons this would be occuring? i would think it should *just* work...

---------- Post updated at 11:56 AM ---------- Previous update was at 11:33 AM ----------

I just copied and pasted your code exactly into my script and it says:

syntax error at line 4: `FILE=/public/appl-fp$' unexpected

the script files really dont like the dollar sign.

Having two #! lines is useless. Only the first #! does anything.

Is your text editor perhaps putting in linebreaks?

Merely a gut feeling - but why not try a different text editor, e.g. Nano or Kate ...?

tried your suggestion. nothing changed. i even echo'd the env variables in my script to make sure the correct directories are assigned. i am completely stumped at why its doing this...

copy-paste the output of 'cat my-script'

Figured out what was up, when switching over to unix, i didn't realize that `date` is used instead of $(date) in the script file.

can anyone maybe offer more insight to why the difference in the command when running in shell versus running in script?

---------- Post updated at 01:38 PM ---------- Previous update was at 01:35 PM ----------

btw, i am running sco unix. and a super outdated version at that. so anyone reading this, keep that in mind.

[comment removed]

switching over to unix from what?

$(date) should work in most anything but fabulously obsolete shells.

Well then.

i am the systems administrator, so i am dealing with lots of o.s. including but not limited to:
SCO UNIX 'a few of them
UBUNTU 6.06(server), 9.04 (server, desktop), 9.10 (desktop) 'many
Windows xp (pro, home) / 7

i have personally used, ubuntu, redhat, suse, and many versions of live cd's for school and personally use.
i dont wish to print out the full paths and code i currently have now, plus its already over 100 lines of code. i will just make a quick script that show the difference, maybe someone here can give me insight onto why one would work and not the other. (i will provide the output of each)

contents of delme1

File Name

Content of file

contents of delme2

File Name

Content of file

It sound like you guys know a lot about unix and that this should not be happening. can you think of any reason why sco unix would freak out on such a simple syntax difference?
Remember, i can run the commands that fail with the script in the sco unix shell just fine.

the commands i used to run the scripts is this
sh delme1
sh delme2

i would really really really like to know what in the world the difference is!