adding text to JPEGs, in bulk
Todd Zullinger
tmz at pobox.com
Sat Sep 16 04:41:26 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tim wrote:
> I think I can work out how to handle a batch of files to add
> consistent text, now. But I haven't worked out how I could extract
> "256" from a filename like "img_0256.jpg", yet. The filenames are
> all the same length, so there's got to be some tool that'll let me
> strip characters 7, 8 & 9 out of the name.
Here are two ways that could be done.
num=`expr "img_0256.jpg" : "img_0\([0-9]*\).jpg"`
or
num=`echo "img_0256.jpg" | cut -c6-8`
Put into a for or while loop and season to taste. :)
- --
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
======================================================================
Nothing is so simple that it cannot be misunderstood.
-- Teague's Paradox
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iQFDBAEBAgAtBQJFC4B2JhhodHRwOi8vd3d3LnBvYm94LmNvbS9+dG16L3BncC90
bXouYXNjAAoJEEMlk4u+rwzjAeYH/iZKaAFcHaNmm8Ta/gK3Fb8QApnfeT1PUI32
zQHryfBOeFAgSbtUYKN3i2vKH/EPaMZ90GrfNwb1uMZNLZiktxoNfAi23ikUGOiL
kuZG7xNDOkf4CmgDR7mhtE45LrKpkBBHtdx7hUMyH9uhO1imNS9P0zKNBHR5v7j4
NvqlaG2GqQgy0i8zNTjF+23JnXxXyNwqP/gnttabnH8Ac9k3War8HApjL6xzKE7a
QHzNONKxP6FVOOol1IhZystinX3SmNroXofUFDEPlxZDaDOt0J3uSDOA1cugLXlM
bDUEH9sbLJaS4C6IW7Asp5YxRy9tAse8WGf779/4g7OvdbMeyTA=
=SfVh
-----END PGP SIGNATURE-----
More information about the users
mailing list