|
scripting question
hi all,
i'm new here, i would like to add on the print command to prompt user to enter a value and store inside the variable name as $inName like
print "what is your directory : ";
then the answer is storing to &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
thanks
|