adding text to JPEGs, in bulk

Cameron Simpson cs at zip.com.au
Sun Sep 17 09:32:13 UTC 2006


On 17Sep2006 18:48, Tim <ignored_mailbox at yahoo.com.au> 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.
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Success in software development depends on making a carefully planned
series of small mistakes in order to avoid making unplanned large
mistakes.       - Steve McConnell, _Software Project Survival Guide_




More information about the fedora-list mailing list