Date: Fri, 11 Dec 1998 13:44:54 -0600 (CST) From: "Paul T. Root" <proot@horton.iaces.com> To: jataylor@lundahl.com (James A. Taylor) Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Recursing directories? Message-ID: <199812111944.NAA05626@horton.iaces.com> In-Reply-To: <3671754E.AC4F0F65@lundahl.com> from "James A. Taylor" at "Dec 11, 98 12:41:02 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
In a previous message, James A. Taylor said:
> 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?
You have to escape the ; so the shell doesn't take it and sends it to the
find.
find . -type d -exec script {} \;
--
"Tomorrow doesn't matter, for I have lived today."--Horace (65-8 B.C.)
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?199812111944.NAA05626>
