Hi,
I am trying to debug an old script and have found the problem lies within this function:
isIdoc() { # validate the file type
fileType=`file $1 | awk '{print $NF}'`
[ $fileType = "IDOC" ] && echo 0 || echo 1
}
My question is, how can I determine what is in the variable $fileType ? The program is failing only randomly, but I cannot modify the script (yet), so I need to know what value is being tested to "IDOC"... i'm not so sure what data is coming out of awk '{print $NF}'.
Thanks for any help...
FS