On Fri, Jun 08, 2007 at 12:37:22PM +0100, MJ Ray wrote:
Chris G cl@isbd.net wrote:
find info -name '*.txt' -exec echo `basename {} .txt` \;
I think the backticks are run by the shell before find.
Try:
find info -name '*.txt' | while read filename ; do mv -v "$filename" "${filename/%.txt/.rst}" done
In the end I just wrote the output of find to a file and then edited the file to a series of mv commands and ran that.
The issue is definitely that bash parses the `` before the find is run.