Thank you bartus, it worked perfectly. But, I cannot decode the logic. Could you please explain this to me?
Few doubts in this:
NR!=FNR --> this is needed because I told that counting of the lines may not be same in both the files? Or this is an indicator to parse the second file? If that so, this explicit indication is really needed to make awk to parse the 2nd file? Please clarify me.
You second guess is correct. NR==FNR means parsing 1st file, and NR!=FNR - second. It can be written differently thought:
Hi, Im trying to take a database backup. one of the files is 26 GB. I am using cp -pr to create a backup copy of the database. after the copying is complete, if i do du -hrs on the folders i saw a difference of 2GB.
The weird fact is that the BACKUP folder was 2 GB more than the original one!
... (1 Reply)
hi all,
in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders...
please help me, how can i find the total size of these specific files in the server... (3 Replies)
I have a file which gets appended with records daily..for eg. 1st day of the month i get 9 records ,2nd day 9 records .....till the last day in the month...the no of records may vary...i store the previous days file in a variable oldfile=PATH/previousdaysfile....i store the current days file in a... (6 Replies)
Hi All...
is the below command be modified in sucha way that i can get the file size along with the name and path of the file
the below command only gives me the file location which are more than 100000k...but I want the exact size of the file also..
find / -name "*.*" -size +100000k
... (3 Replies)
I have two files as below
File1:
a
b
c
d
File2:
a
b
When i find the difference the output would be c&d..
How can i get my requirement...pls help...
Many thanks in advance (10 Replies)
Hi Experts,
My requirement is to compare the second field/column in two files, if the second column is same in both the files then compare the first field. If the first is not matching then print the first and second fields of both the files.
first file (a .txt)
< 1210018971FF0000,... (6 Replies)
Hi!
I want to find duplicate files (criteria: file size) in my download folder.
I try it like this:
find /Users/frodo/Downloads \! -type d -exec du {} \; | sort > /Users/frodo/Desktop/duplicates_1.txt;
cut -f 1 /Users/frodo/Desktop/duplicates_1.txt | uniq -d | grep -hif -... (9 Replies)
I have 2 files as follows.
file1.txt
<cell>123</cell>
<cell>345</cell>
file2.txt
<cell>123</cell>
<cell>456</cell>
out out should be
output.txt
<cell>456></cell>
How do we achieve this> The difference betwenn the two files should be wirtten to the output file..
... (2 Replies)
Hi,
The requirement is to compare two files that has single column of records each. Comparison is to happen on a whole and not line by line.
File1.txt
314589929
315611087
304924413
315989094
301171509
302984393
315609549
314593632
File2.txt
315611087
304924413
315989094 (2 Replies)
Hi All,
I want to find difference between two files and output only lines which are not present in second file .I am using awk and I am getting only the first difference but I want to get all the lines which are not present in file2 .Below is the code I am using . Please help to get the desired... (7 Replies)
Discussion started by: srinivasrao
7 Replies
LEARN ABOUT DEBIAN
qpsmtpd::command
Qpsmtpd::Command(3pm) User Contributed Perl Documentation Qpsmtpd::Command(3pm)NAME
Qpsmtpd::Command - parse arguments to SMTP commands
DESCRIPTION
Qpsmtpd::Command provides just one public sub routine: parse().
This sub expects two or three arguments. The first is the name of the SMTP command (such as HELO, MAIL, ...). The second must be the
remaining of the line the client sent.
If no third argument is given (or it's not a reference to a CODE) it parses the line according to RFC 1869 (SMTP Service Extensions) for
the MAIL and RCPT commands and splitting by spaces (" ") for all other.
Any module can supply it's own parsing routine by returning a sub routine reference from a hook_*_parse. This sub will be called with
$self, $cmd and $line.
On successfull parsing it MUST return OK (the constant from Qpsmtpd::Constants) success as first argument and a list of values, which will
be the arguments to the hook for this command.
If parsing failed, the second returned value (if any) will be returned to the client as error message.
EXAMPLE
Inside a plugin
sub hook_unrecognized_command_parse {
my ($self, $transaction, $cmd) = @_;
return (OK, &bdat_parser) if ($cmd eq 'bdat');
}
sub bdat_parser {
my ($self,$cmd,$line) = @_;
# .. do something with $line...
return (DENY, "Invalid arguments")
if $some_reason_why_there_is_a_syntax_error;
return (OK, @args);
}
sub hook_unrecognized_command {
my ($self, $transaction, $cmd, @args) = @_;
return (DECLINED) if ($self->qp->connection->hello eq 'helo');
return (DECLINED) unless ($cmd eq 'bdat');
....
}
perl v5.14.2 2009-04-02 Qpsmtpd::Command(3pm)