Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 1998 12:41:02 -0700
From:      "James A. Taylor" <jataylor@lundahl.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Recursing directories?
Message-ID:  <3671754E.AC4F0F65@lundahl.com>
References:  <36716768.BBCAEA1@lundahl.com> <19981211105813.A20974@wolf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm sure your all getting tired of hearing from me today.

I wrote

> > Is it possible to have a shell script recurse a directory tree?
> > Still the same situation as my last email I have a directory tree
> > with .shtml files.  I want to recurse the directory tree renaming
> > each .shtml to a .html file. Paul sent me the following script that
> > allows me to mv all .shtml in a single directory:

Dan Mahoney wrote:

> How about:
>
> find . -type d -exec yourscript {}
>
> where {} gets filled in with the name of each directory that gets found.

  Casper wrote:

> see man find
> u'll use something like this :
>
> find /dir_name/ -name *.shtml -e mv {} `basenahe {} .shtml`.html;

When I run find with the -exec option I get the following error

find: -exec: no terminating ";"

I have put a ; at the end put I still get the error.  What am I doin wrong?

James A. Taylor


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3671754E.AC4F0F65>