guiguy, I just closed a duplicate thread and I see that vino had to edit your post to remove your email address. Please read the rules:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.
As for your question, I copied your data into files which I named file_A and file_B. Then I tried:
The man page is clear that comm -13 is what you need. You were suppressing the wrong column. You tried:
comm -23
which was wrong. There are only two other ways to print a single column:
comm -13
comm -12
Hello,
I want to compare two files. All records in file 2 that are not in file 1 should be output to file 3.
For example:
file 1
123
1234
123456
file 2
123
2345
23456
file 3 should have
2345
23456
I have looked at diff, bdiff, cmp, comm, diff3 without any luck! (2 Replies)
I have made several attempts to read two files of ip addresses and eliminate records from file1 that are in file2.
My latest attempt follows. Everything works except my file3 is exactly the same as file1 and it should not be.
# !/usr/bin/bash
#
# NoInterfaces
# Utility will create a file... (8 Replies)
I've got two large csv text table files with different number of columns each.
I have to compare them based on first two columns and create resulting file
that would in case of matched first two columns include all values from first one and all values (except first two colums) from second one. I... (5 Replies)
Hello,
I've created the script below to compare the content of two files with a delay of an hour. After an hour, the lines that exist in both files, will be printed and executed.
The script now uses a counter to countdown 50 minutes. But what I would prefer is to check the file timestamp of... (3 Replies)
I am having two csv files i need to compare these files and the output file should have the information of the differences at the field level.
For Example,
File 1:
A,B,C,D,E,F
1,2,3,4,5,6
File 2:
A,C,B,D,E,F
1,2,4,5,5,6
out put file: (12 Replies)
Hi,
Need help ...I want to create multiple directories in different /file systems using for loop..eg.../ORCL_data01/oradata/orcl/ctl.
../ORCL_data01/oradata/orcl/data.
../ORCL_data01/oradata/orcl/redo.
Script :-
=========
for dir in `ls -d... (8 Replies)
Hi, I am newbie in shell script.
I need your help to solve my problem.
Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file.
File1:
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
HI,
I have 2 text files. file1 and file2.
file1.txt (There are no duplicates in this file)
1234
3232
4343
3435
6564
6767
1213
file2.txt
1234,wq,wewe,qwqw
1234,as,dfdf,dfdf
4343,asas,sdds,dsds
6767,asas,fdfd,fdffd
I need to search each number in file1.txt in file2.txt's 1st... (6 Replies)
I have two files:
smw:/working/iso_testing # cat a
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm
aaa_base-13.2+git20140911.61c1681-1.3.i586.rpm
acpica-20140724-2.1.2.i586.rpm
test.rpm
smw:/working/iso_testing # cat b
QConvergeConsoleCLI-1.1.03-49.x86_64.rpm... (12 Replies)
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
LEARN ABOUT DEBIAN
path::class::file::stat
Path::Class::File::Stat(3pm) User Contributed Perl Documentation Path::Class::File::Stat(3pm)NAME
Path::Class::File::Stat - cache and compare stat() calls on a Path::Class::File object
SYNOPSIS
use Path::Class::File::Stat;
my $file = Path::Class::File::Stat->new('path','to','file');
# $file has all the magic of Path::Class::File
# sometime later
if ($file->changed)
{
# do something provocative
}
DESCRIPTION
Path::Class::File::Stat is a simple extension of Path::Class::File. Path::Class::File::Stat is useful in long-running programs (as under
mod_perl) where you might have a file handle opened and want to check if the underlying file has changed.
METHODS
Path::Class::File::Stat extends Path::Class::File objects in the following ways.
use_md5
Calling this method will attempt to load Digest::MD5 and use that instead of stat() for creating file signatures. This is similar to how
File::Modified works.
changed
Returns the previously cached File::stat object if the file's device number and inode number have changed, or if the modification time or
size has changed.
Returns 0 (false) otherwise.
While File::Modified uses a MD5 signature of the stat() of a file to determine if the file has changed, changed() uses a simpler (and
probably more naive) algorithm. If you need a more sophisticated way of determining if a file has changed, use the restat() method and
compare the cached File::stat object it returns with the current File::stat object.
Example of your own changed() logic:
my $oldstat = $file->restat;
my $newstat = $file->stat;
# compare $oldstat and $newstat any way you like
Or just use File::Modified instead.
restat
Re-cache the File::stat object in the Path::Class::File::Stat object. Returns the previously cached File::stat object.
The changed() method calls this method internally if changed() is going to return true.
SEE ALSO
Path::Class, Path::Class::File, File::Signature, File::Modified
AUTHOR
Peter Karman, <karman@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Peter Karman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-01-28 Path::Class::File::Stat(3pm)