Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 1998 11:41:44 -0700
From:      "James A. Taylor" <jataylor@lundahl.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Recursing directories?
Message-ID:  <36716768.BBCAEA1@lundahl.com>

next in thread | raw e-mail | index | archive | help
First of all thanks to Paul for his help with the mv command.

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:

#!/bin/sh
for i in *.shtml
do
    j=`basename $i .shtml`
    mv $i $j.html
done

This script works and changes all of the .shtml in the current
directory.  Is their a way I can get the script to recurse my
directory tree?

Many Thanks

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?36716768.BBCAEA1>