View Single Post
Old Feb 11th, 2008, 2:24 PM   #2
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
Re: scripting question

echo "Which directory \c"
read directory
tmpfile=/tmp/tmpfile.$$

for file in loaderconfiguration*.xml
do
  sed "s|${directory}|$inName|g" $file > $tmpfile
  mv $tmpfile $file
done

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.
jim mcnamara is offline   Reply With Quote