On Friday 07 November 2008 21:19, Polytropon wrote:
> On Fri, 07 Nov 2008 13:36:51 +0100, Laszlo Nagy <[EMAIL PROTECTED]> 

> A batch solution is simple:
>       #!/bin/sh
>       for f in *eps; do
>               convert ${f} `basename ${f} .eps`.jpg
>       done

You can also save yourself repeated calls to basename by using

for f in *eps; do
    convert ${f%.eps}.jpg

Look under parameter expansion in the manpage for sh(1) (or bash(1) if you 
have bash installed). As far as I can tell csh/tcsh doesn't support this 
useful feature.

Essentially, a Bourne-type shell with parameter expansion expands 
${variable#prefix} or ${variable%suffix} to $variable with the prefix or 
suffix, respectively, removed.

freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to