[EMAIL PROTECTED] wrote:
Hi
Hello,
I would like to compare two files by comparing the files dates.
If one file shows
ls -la May 12 2003 filename
and the other name shows the same date they are OK for me (I'm not
interested in the time part only the date of the file)
But if the dates ar
2007/10/5, Paul Lalli <[EMAIL PROTECTED]>:
> On Oct 5, 7:50 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
> > 2007/10/5, [EMAIL PROTECTED]
> > <[EMAIL PROTECTED]>:
> >
> > > I would like to compare two files by comparing the files dates.
> > >
Jeff Pang wrote:
2007/10/5, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>:
I would like to compare two files by comparing the files dates.
If one file shows
ls -la May 12 2003 filename
and the other name shows the same date they are OK for me (I'm not
interested in the time part only the
On Oct 5, 7:50 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
> 2007/10/5, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]>:
>
> > I would like to compare two files by comparing the files dates.
> > If one file shows
> > ls -la May 12 2003 filename
> > and the other name
2007/10/5, Jeff Pang <[EMAIL PROTECTED]>:
> 2007/10/5, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]>:
> > How do I do this in Perl?
>
> Hi,
>
> if ( int(-M "file1.txt") != int(-M "file2.txt") ) {
> # copy the file
> }
>
Forgot to tell you what's -M in perl,from `perldoc perlfunc`:
-M Script start
2007/10/5, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>:
> Hi
> I would like to compare two files by comparing the files dates.
> If one file shows
> ls -la May 12 2003 filename
> and the other name shows the same date they are OK for me (I'm not
> interested in the time p
Hi
I would like to compare two files by comparing the files dates.
If one file shows
ls -la May 12 2003 filename
and the other name shows the same date they are OK for me (I'm not
interested in the time part only the date of the file)
But if the dates are not the same I would like to copy o
Your code logic says that you want to find lines in '2.txt' that are NOT in
'1.txt'.
thanks for all answerers.
yeah,I have put less attention on that code,and have made a fatal logic error.
but the way mentioned by John, putting file's all contents to a hash,
maybe somewhat less efficiency when
Jeff Pan wrote:
> hi,
>
> Is there a best way to find some lines which exists in both two files?
I usually use the Unix comm(1) utility. Its very efficient, but the input
files need to be sorted. Google for "ppt comm" and you can find a Perl
version.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Jeff Pan wrote:
> hi,
Hello,
> Is there a best way to find some lines which exists in both two files?
Your code logic says that you want to find lines in '2.txt' that are NOT in
'1.txt'.
> Someone has show me a method but it seems a little low efficiency.
Not only that but it doesn't work corr
On Oct 11, 2005, at 11:18, Jeff Pan wrote:
Is there a best way to find some lines which exists in both two files?
Someone has show me a method but it seems a little low efficiency.
The code is as below:
Have you searched CPAN for diff modules?
-- fxn
--
To unsubscribe, e-mail: [EMAIL PROTEC
hi,
Is there a best way to find some lines which exists in both two files?
Someone has show me a method but it seems a little low efficiency.
The code is as below:
open (T1,"1.txt") or die "$!";
open (T2,"2.txt") or die "$!";
while(my $line=){
chomp $line;
print $line,"\n" unless diff($line)
12 matches
Mail list logo