:)
I agree with
Corion,
marto and
intel.
Then also, im trying to give possible solution i can think of right now
1
perl -le 'foreach $file qw(a.JPG b.exe c.gif d.png e.doc f.xls){ next
+if $file !~ /\.(jpg|png|gif)$/i;print $file}'
2
perl -le '@arr1=qw(a.jpg a.jpg1 b.jpg);@arr2=qw(a.jpg b.jpg c.jpg);foreach $file1 (@arr2) { foreach $file2 (sort @arr1) { $file1=~s/(\d)?$/($1)?$1+1:1/e if $file1 eq $file2;}print $file1}'
"Peace to everyone"
~suhail