![]() |
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 |
Re: scripting question
:
echo "Which directory \c"BEFORE you run this - where is the variable inName defined in your code? As is, it is null. It needs to be set to something, somewhere, before the for loop. |
| All times are GMT -5. The time now is 12:29 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC