HP-UX IF Statement
Posted on 2010-01-12
Hi! I need help with my HP-UX Script. Its been written using Korn Shell. I'm trying to compare the system date, with the first date from a text file. And IF the dates match, it gives me a "Correct". Otherwise it states "Wrong". But it doesn't seem to be working. Please advise. Script and the output result that I see is below. I made a comparison between two dates whereby both dates are of the same date, and the output result should be "Correct". But the error points to my IF statement, and I can't figure out what's wrong. Your help is much appreciated.
phdate= head -1 /usr/users/amsbmi/tmp/ph.txt
if [[$newdate -eq $dd]];
./remplc.sh: [[20100112: not found