I have the following script:
for i in /DVMAXMWL/*.xml
perl -i.bak -pe 's/ay/CR/g;s/SPS-1234/SPS-$RANDOM/g;s/PROC-1234/PROC-$RANDOM/g;s/Pre-Medication//g' $i
java -jar /securerad/dcm4chee-2.17.0-mysql/bin/editmwl.jar -a -f $i
mv $i $i.parsed
I want $RANDOM to be a random six digit number. I wan't it to use the same random six digit number where both $RANDOM variables are, currently. I want the $RANDOM number to change for each file it processes in the /DVMAXMWL folder. I also want the script to pause and then loop for 60 seconds. This is beyond me but need to get it done. Help!