[Malvern] Run a command recursivly in each folder?

Chris Eilbeck chris at yordas.demon.co.uk
Thu Sep 9 20:42:10 BST 2004


On Thu, Sep 09, 2004 at 08:14:09PM +0100, Robin Wilson wrote:
> Hi all,
> 
> Is there a way to run a command recursively in each folder below the current
> folder?
> 
> Eg. I have a folder called Mp3 with loads of subfolders with different
> styles of mp3s in them, is it possible to execute one command from
> /home/robin/mp3 which will run one command in each folder (the command is a
> command that will convert each file in the folder it is run in into an .ogg
> file). Is this possible either with a native command or using a quick and
> small script?


#!/bin/csh

foreach i (`find . -type d -print`)

	insert command here

end


I'd use something like that.

Chris
-- 
Chris Eilbeck                         mailto:chris at yordas.demon.co.uk
MARS Flight Crew                              http://www.mars.org.uk/
UKRA #1108 Level 2                                                UYB
TRA #9527                                                        PSMR



More information about the Malvern mailing list