Thanks for the explanation, but that doesn't really address the problem I'm having.
formatdb_real is failing (ie. return code = 1... or, more accurately, not 0)
The following code:
if [ $? -eq 1 ]
set $(wc -l added_DBs.log)
head -$(($1 - 1)) added_DBs.log >> added_DBs.log
is (supposed to be) designed to remove the line that was just added to added_DBs.log should formatdb_real fail, but it isn't executing.
I have tried a condition of
[ $? -ne 0 ]
but have not had any success.
Any ideas on how to get the conditional to execute as appropriate?
Some may suggest adding the log message after formatdb_real executes. My reason for not doing that is formatdb_real can at times take a long time; I want the user to be able to add the log message and walk away while formatdb_real executes.