5

Replace string, grab files, rename and move

view full story
linux-howto

http://www.unix.com – Hello there! I'm having a lot of trouble writing a script. The script is supposed to: 1) Find all files with the name "Object.mtl" within each folder in the directory: /Users/username/Desktop/convert/Objects 2) Search and replace the string ".bmp" with ".tif" (without the quotations) 3) Output the file to /Users/username/Desktop/convert/Props/ using the name of the folder the object was found in + .mtl Example: Code: Found: /Users/username/Desktop/convert/Objects/Props00/Object.mtl (Replace all ".bmp" with ".tif") Output to: /U (HowTos)