Hello,
I have a little script and the bolded line seems to be giving me fits in the first example.
========================
But it works fine this way:
===================
I am dealing with several servers and several databases, so hardcoding the source and dest will be a pain in the ass, but doable. If someone would tell me how to make the script recognize the variables in the first example on the bolded line, that would be greatly appreciated. Thanks in advance,
Kelly
I have a little script and the bolded line seems to be giving me fits in the first example.
Code:
#!/usr/bin/ksh93n
src=prod
dest=pprd
rm /oradata/dut/${dest}/*
rm /oractl/dut/${dest}/*
rm /oraredo/dut/${dest}/*
for i in `find /orabak/staged/${src}/data/ -name "*.dbf" -print`; do
[b] j=`echo $i | sed 's!.*/!!;s!${src}!${dest}!'`[/b]
dd if=$i of=/oradata/dut/${dest}/$j bs=262144
done
But it works fine this way:
Code:
#!/usr/bin/ksh93n
src=prod
dest=pprd
rm /oradata/dut/${dest}/*
rm /oractl/dut/${dest}/*
rm /oraredo/dut/${dest}/*
for i in `find /orabak/staged/${src}/data/ -name "*.dbf" -print`; do
[b] j=`echo $i | sed 's!.*/!!;s!prod!pprd!'`[/b]
dd if=$i of=/oradata/dut/${dest}/$j bs=262144
done
I am dealing with several servers and several databases, so hardcoding the source and dest will be a pain in the ass, but doable. If someone would tell me how to make the script recognize the variables in the first example on the bolded line, that would be greatly appreciated. Thanks in advance,
Kelly