Re: adding text to JPEGs, in bulk

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

 



-----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-----

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux