Re: adding text to JPEGs, in bulk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cameron Simpson wrote:
> On 17Sep2006 18:48, Tim <ignored_mailbox@xxxxxxxxxxxx> wrote:
> | On Fri, 2006-09-15 at 14:28 -0400, Amadeus W. M. wrote:
> | > for file in *.jpg
> | > do
> | >         outputname=`basename $file .jpg`_out.jpg
> | >         convert [drawing command] $file $outputname
> | > done
> | 
> | Does adding files to the same directory it's reading from change how the
> | "for files in" function works?
> 
> Not on the first loop - the *.jpg is evaluated before the loop runs.
> Next time of course there are more files.
> 
> | > You can do this directly at the prompt, or you can save it in
> | > a bash script.
> | 
> | I've not figured out how to do multi-line commands at the command line.
> 
> Just type them. You will find an incomplete command (eg just the first
> line from the "for" loop above) will get you the shell's "secondary
> prompt", indicating more is needed. When you've entered the "done"
> it will run.
You can also put more then one command on the same line by using ;
to separate commands.

or file in *.jpg ; do outputname=`basename $file .jpg`_out.jpg ;
convert [drawing command] $file $outputname ; done

It gets wrapped in the e-mail, but you enter it all as one line at
the command prompt. Now, if you have one command that is ling, you
can break it up by putting a \ at the end of the line. (You usually
need a space before it.)

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux