in which order are these bash commands executed ? is it possible that the fourth line starts before the first or the second one finish ?
find $LOCAL_TMP -type f -exec grep -l 'operationType="ACTIVATION"' {} ';' | xargs grep -l 'serviceCode="ACC-FTTS' | xargs -ICrTopoIpnatif mmv CrTopoIpnatif $LOCAL_TOPO
find $LOCAL_TMP -type f -exec grep -l 'operationType="DEACTIVATION"' {} ';' | xargs grep -l 'serviceCode="ACC-FTTS' | xargs -ICrTopoIpnatif mmv CrTopoIpnatif $LOCAL_TOPO
echo "mmv $LOCAL_TMP/**/*.xml $REP_LOCAL" >> $LOGFILE
mmv "$LOCAL_TMP/**/*.xml" "$REP_LOCAL" >> $LOGFILE
I am asking, because I found the files in $REP_LOCAL (which was a pool directory for another script, and the files show on the script's log), and not in $LOCAL_TOPO (nothing on the script's log here).
$LOCAL_TMPor$LOCAL_TOPOhave an&character in them?