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
Quote:
#!/bin/bash
touch "/public/david/delme1$(date +%Y).txt"
FILE1="/public/david/delme1$(date +%Y).txt"
echo "OUTPUT" > $FILE1
File Name
Content of file
contents of delme2
Quote:
#!/bin/bash
touch "/public/david/delme1`date +%Y`.txt"
FILE1="/public/david/delme1`date +%Y`.txt"
echo "OUTPUT" > $FILE1
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!
Quote:
P.S. I tried changing line 1 from bash to sh as well, nothing changed in either script.