I have this problem with this awk, that it works but I get the command not found error
for line in $(cat ${FILE_LIST_PROCES}); do
ARCHIVO=$line
echo "[`date '+DATE: %m/%d/%y %H:%M:%S'`] - Validando script: "$ARCHIVO
if [ ! -f $ARCHIVO ]; then
echo "[`date '+DATE: %m/%d/%y %H:%M:%S'`] - ERROR -"
exit ${ARCHIVO_NO_ENCONTRADO}
else
`gawk '{
if (/GRANT/||/REVOKE/)
if (/EXECUTE/||/REFERENCES/||/TRIGGER/||/ALL PRIVILEGES/)
print "1";
else{
I=0;
while (I<=NF){
if ($I == "TO")
if ($++I !~ /^[^uU][0-9]{6};?$/)
print "1";
I++
}
}
}' "$ARCHIVO"`
if [[ $? -eq 0 ]];then
$ARCHIVO >> $FILE_LIST_TMP
else
echo "[`date '+DATE: %m/%d/%y %H:%M:%S'`] - ERROR - "
mv $ARCHIVO $FILE_ERRORES
fi
fi
done
with the following error when I echo 1, I don't understand what is the problem
./build.sh: line 80: 1: command not found