in reply to Backticks within child process
Out of curiosity, does your problem go away if you put sleep 1; before your if statement?