Harinatha Reddy M wrote:
I want to remove any duplicate files(same in content with different file
names) in a particular directory.
How can we do that?
$ cpan Bundle::Dpchrist
$ man finddups
And what if the file is being accessed by some process. Can we delete it?
Dpchrist
On Jul 13, 2010, at 11:32, Erez Schatz wrote:
> On 13 July 2010 18:16, Shawn H Corey wrote:
>
>> Because [] define a character set; everything inside it is a character.
>> That means it does not expand \1.
>
> That's not entirely correct. Character classes recognize variables,
> escaped ch
On 13 July 2010 18:16, Shawn H Corey wrote:
> Because [] define a character set; everything inside it is a character.
> That means it does not expand \1.
That's not entirely correct. Character classes recognize variables,
escaped characters and some other regexp notation, but not \1
back-refer
On Tue, Jul 13, 2010 at 06:00, Bryan R Harris
wrote:
>
>
> I'm trying to temporarily deal with simple quoted strings by turning:
>
> data: "this is a string" more: "this is another"
>
> into...
>
> data: "this is a string" more: "this is another"
>
> I thought this would work:
>
> s/(['"])([^\1
On 13 July 2010 13:00, Bryan R Harris wrote:
>
> I thought this would work:
>
> s/(['"])([^\1]*)\1/${1}.despace($2).$1/gse;
>
> ... but it doesn't. It looks like the [^\1]* in the regexp isn't working
> right.
Character classes (characters inside square brackets - []) in regexp
notation, inter
On 10-07-13 06:00 AM, Bryan R Harris wrote:
I'm trying to temporarily deal with simple quoted strings by turning:
data: "this is a string" more: "this is another"
into...
data: "this is a string" more: "this is another"
I thought this would work:
s/(['"])([^\1]*)\1/${1}.despace($2
How about...
#!/usr/bin/perl
use warnings;
$_ = "data: \"this is a string\" more: \"this is another\"";
s/(\w+)\s/$1 /g;
print "$_\n";
It prints:
data: "this is a string" more: "this is another"
On Tue, Jul 13, 2010 at 6:00 AM, Bryan R Harris wrote:
>
>
> I'm trying to temporarily deal with
I'm trying to temporarily deal with simple quoted strings by turning:
data: "this is a string" more: "this is another"
into...
data: "this is a string" more: "this is another"
I thought this would work:
s/(['"])([^\1]*)\1/${1}.despace($2).$1/gse;
sub despace {
my $t = shift;
From: Shawn H Corey
> On 10-07-13 01:58 AM, John W. Krahn wrote:
>> Harinatha Reddy M wrote:
>>> And what if the file is being accessed by some process. Can we
delete it?
>>
>> Probably not on Windows, probably yes on Unix/Linux.
>
> On Linux, the contents of the file will be kept until all proce
On 10-07-13 01:58 AM, John W. Krahn wrote:
Harinatha Reddy M wrote:
And what if the file is being accessed by some process. Can we delete it?
Probably not on Windows, probably yes on Unix/Linux.
On Linux, the contents of the file will be kept until all processes that
have it open, closes it
On Mon, Jul 12, 2010 at 15:21, redtigra wrote:
> Rob,
>
> GREAT thanks, your explanantion is very detailed and very clear. Looks
> like I don't have a clear understanding regarding -n option, so I have
> something for reading for the evening :)
snip
When trying to understand what Perl is doing be
Rob,
GREAT thanks, your explanantion is very detailed and very clear. Looks
like I don't have a clear understanding regarding -n option, so I have
something for reading for the evening :)
> If you
> want to have a decent solution that others can understand and read put this
> in a small script wh
12 matches
Mail list logo