Tuesday, November 17, 2009

perl regexp one liner to copy some images

oki have the images from one day on the camera card and i need to copy them
this works!

ls /mnt/usb/dcim/100ncd80/ -ltr |grep 2009-10-20|perl -pe 's/.*(dsc.*)/$1/'
lists the images i want
so
cd /mnt/usb/dcim/100ncd80/
then

ls -ltr |grep 2009-10-20|perl -pe 's/.*(dsc.*)/$1/'|xargs -I {} cp {} /home/debianuser/conferences/conf20091118

this works well!

and here is the flip images script to rotate the images

cat bin/flip_journal.pl
#!/usr/bin/perl -w
use strict;
my $angle=shift;
my $dir=shift;
if (!($angle && $dir)) {print"missing either the angle or the directory"; die;}
opendir (IN,$dir);
my @list;
@list=readdir (IN);
foreach (@list)
{
next if ($_ eq '.' || $_ eq '..');
system ("convert -rotate $angle $_ $_ ");
}

1 comment:

Gamepoly.NET said...

warrock hack,warrock hacks,war rock hack,war rock hacks,warrock vip hack,warrock premium hack,warrock level hack,warrock opk hack,warrock stamina hack,warrock yeni hack,warrock güncel hack,warrock çalışan hack,warrock d3d hack,warrock soruce hack,warrock gold premium hack,warrock dinar hack,warrock retail hack,warrock wall hack,wall hack,warrock gm hack,warrock vip al,warrock vip hack,gamepoly warrock hack,gamepoly warrock hacks,www.gamepoly.net warrocktr,warrock ticket göndermek,warrock ticket atma,warrock ticket nasıl atılır,warrock levellar,warrock rütbeleri,warrock kısayol komutları,warrock oyun taktikleri,warrock download,warrock,warrock sistem gereksinimleri,warrock,tr.warrock.net,tr.warrock.net,resmi warrock forumu,warrock forum,warrock hack forum,warrock hack team,wrhackteam,warrock hacker,warrock game hack,game hack,game hacks,gh,warrock vip source,warrock public hack,warrock semi hack

WARROCK FORUM : http://www.gamepoly.net/forum/war_rock-b13.0/

WARROCK HACK FORUM : http://www.gamepoly.net/forum/war_rock_hack-b31.0/

www.gamepoly.net