tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ c-shell

Crontab ▻

need help with optimizing script

In article <88s19b$fi0$1@nnrp1.deja.com>,  <arsc@my-deja.com> wrote:
>I have a directory which contains besides other
>files also files with the file extension *.L
>I need to run a program called "metadata -u" for
>each of those *.L files, the output needs to be
>directed in a text file which has the same name as
>the *.L file.

In Bourne shell:

    for i in *.L; do
        metadata -u "$i" > "`basename "$i" .L`".txt
    done

Tim.
--
Tim Goodwin   | "If you don't know what closures are, you probably don't
Leicester, UK | want to know what closures are." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: need help with optimizing script
Date: 23 Feb 2000 13:00:31 -0000
Message-ID: <890lm5$jtk$1@ltpcg.star.le.ac.uk>
References: <88s19b$fi0$1@nnrp1.deja.com>

△ comp.unix.shell △

◅ c-shell

Crontab ▻