background preloader

Exiftool (Perl)

Facebook Twitter

Change the date and time (or any other EXIF image meta-data) of pictures with Ubuntu. Change the date and time (or any other EXIF image meta-data) of pictures with Ubuntu There is a very flexible and easy Linux tool that helps you change the EXIF meta-data of images.

Change the date and time (or any other EXIF image meta-data) of pictures with Ubuntu

It allows you to change individual files or whole bunch of them with one command. You can also put different rules about what files and how you want to change them if you need to. The program is called exiftool. So let’s install it first. In terminal execute: sudo apt-get install libimage-exiftool-perl Now you are ready to start changing the meta-data of the images.

For example, if I wanted to change all the dates and times (DateTimeOriginal, CreateDate and ModifyDate) of the IMG_01.jpg file to the 8th of August 2010 at 3:35:33 PM I would do: exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original IMG_01.jpg If I wanted to change the dates on all the files in the “images” directory, I would do: Perldoc.perl.org. <div class="noscript"><p><strong>Please note: Many features of this site require JavaScript.

Perldoc.perl.org

You appear to have JavaScript disabled, or are running a non-JavaScript capable web browser. </strong></p><p> To get the best experience, please enable JavaScript or download a modern web browser such as <a href=" Explorer 8</a>, <a href=" <a href=" or <a href=" Chrome</a>. </p></div> perlre - Perl regular expressions This page describes the syntax of regular expressions in Perl. If you haven't used regular expressions before, a quick-start introduction is available in perlrequick, and a longer tutorial introduction is available in perlretut. For reference on how regular expressions are used in matching operations, plus various examples of the same, see discussions of m//, s///, qr// and ?? Modifiers Matching operations can have various modifiers.

M Treat string as multiple lines. /x Taken together, these features go a long way towards making Perl's regular expressions more readable. Funzioni e regular expression. Esiste tutta una serie di caratteri speciali utilizzabili all'interno delle espressioni: una lista di quelli più generici è disponibile in tabella 1.

Funzioni e regular expression

Ad esempio: /^Anna/ restringe la ricerca del pattern (cioè la sottostringa) al solo inizio della stringa, quindi l'esito sarà positivo solo nel primo e nel terzo caso dei quattro esposti sopra. Naturalmente è possibile limitare la ricerca solo alla parte finale della stringa con: /Anna$/ Ora la regular expression darà responso positivo solo nel quarto caso. /^Anna$/ In questa specifica situazione il matching con regular expression ha lo stesso significato di una normale comparazione tramite eq. /Anna\$/ cerca effettivamente il pattern Anna$. /Anna|Camilla/ ha esito positivo se la stringa contiene il pattern Anna oppure Camilla oppure entrambi. /(Anna|Camilla|Michele) va al cinema/ Un matching con quest'espressione è positivo se la stringa in cui si effettua la ricerca contiene una delle seguenti sottostringhe: Perl Regular Expressions.

Troubleshooters.Com and Code Corner Present Copyright (C) 1998-2001 by Steve Litt Without regular expressions, Perl would be a fast development environment.

Perl Regular Expressions

Probably a little faster than VB for console apps. With the addition of regular expressions, Perl exceeds other RAD environments five to twenty-fold in the hands of an experienced practitioner, on console apps whose problem domains include parsing (and that's a heck of a lot of them). Regular expressions is a HUGE area of knowledge, bordering on an art. Regular expressions are a syntax, implemented in Perl and certain other environments, making it not only possible but easy to do some of the following: Complex string comparisons $string =~ m/sought_text/; # m before the first slash is the "match" operator.

Simple String Comparisons The most basic string comparison is $string =~ m/sought_text/; The above returns true if string $string contains substring "sought_text", false otherwise.