I want to recursively change many files named raw.tex
to parent-directory-hw.tex
. Is there a simple scripting solution to this problem?
For example, running the script on
.
`-- root
|-- baz
| `-- raw.tex
|-- foo
| `-- bar
| `-- raw.tex
`-- spam
|-- eggs
| `-- raw.tex
`-- raw.tex
should result in
.
`-- root
|-- baz
| `-- baz-hw.tex
|-- foo
| `-- bar
| `-- bar-hw.tex
`-- spam
|-- eggs
| `-- eggs-hw.tex
`-- spam-hw.tex