On 4/8/06, Max von Seibold <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to run an image conversion program to rotate the contents of an
> entire directory.
>
> This is run as thus:
>
>
> "jpegtran -rotate 90 *.jpg"
>
>
> The problem is that I need to specify the filename for each converted
> image. Is there some command which 'takes' the value of the file for
> each iteration? I'm guessing something along the lines of $1 but i'm not
> sure...
>
> Sorry if this is not technically perl . I will be trying to use this in
> a perl script but want to understand how to do it on the command line
> first.
>
>
>
> Thank you,
>
>
>
> Max.
>

Max,

please see the FAQ. Particularly the section on what to do when your
email starts with "I know this isn't the right place but".

You need to find a good refernce for the shell you're using. they all
have different syntax, and none of them are perl's syntax. You might
also want to take a look at man xargs.

But but since this is a Perl list, why wait to do it with perl? Just
write yourself a one-liner. This should get you started:

    perl -e 'system("jpegtran -rotate 90 $_") foreach @ARGV' *.jpg

HTH,

-- jay
--------------------------------------------------
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!

Reply via email to