The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-27-2009
beery beery is offline
Registered User
  
 

Join Date: May 2009
Posts: 5
Thanks for the response Jerry,

My problem seems to run deeper,

I have a directory called shp_mslinks, with a series of files, lets say;

XXXX_original.shp
XXXX_UPDATE.shp
YYYY_original.shp
YYYY_UPDATE.shp
ZZZZ_original.shp
ZZZZ_UPDATE.shp
ect.

I also have a do loop which will preform a transformation on each file in the shp_mslinks directory, my loop;

# enter do loop and translate each shp file in the InputDirectory

for file in $InputDirectory/*.shp
do
# strip off path
fname=${file##*/}
# strip off extention
fname=${fname%.*}
print |tee -a -i $WorkingDirectory/change.txt
print "translating $fname.shp from shape to shape" |tee -a -i $WorkingDirectory/change.txt
print "======================" |teje -a -i $WorkingDirectory/change.txt

# run translation program
done

The problem is is only runs the transformation on the _original.shp files in the shp_mslinks directory and I want it to run on both the _original.shp and _UPDATE.shp

Thanks again.