i would like to add on the print command to prompt user to enter a value and store inside the variable name as $inName
after that the value will replace the existing line for ${METRICA_DIR}/TechnologyPacks/Spool/2030324032
i'm new in scripting, could anyone give me some hint for sripting?
tmpfile=/tmp/tmpfile.$$
for file in loaderconfiguration*.xml
do
sed 's|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g' $file > $tmpfile
mv $tmpfile $file
done
You getting the directory name in the variable file.
and then you are using it as the filename ???
I guess this will create confusion. Pls post with care.
for file in loaderconfiguration*.xml
do
echo "what is the path:";
read $path;
sed "s|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$path|g" $file > $tmpfile
mv $tmpfile $file
done
any changes need to change which is highlighter with red colour...
give some advise and hint please...