I want to determine if there's any xml files exist & if so copy each xml to that directory. Is my code correct for doing that? I can't test my script yet. Somebody please explain it to me please?
if [[ "$xmlFileNames" == "" ]]; then
#print "No Status type XML files received from server in $DIRECTORY"
else
for xmlFileName in ${xmlFileNames}
do
xmlFileName=$(echo $xmlFileName | sed 's|./||') # Remove leading ./ path that find command prefixes to filenames
cp -f $xmlFileName $DIRECTORY/$xmlFileName
done
fi