i have 2 files
file 1---------> hello
file 2---------> hello world
is there any command that we find the diff b/w two files and gives the ans as what is not matched with file 2.
diff file 1 file 2
here the desired o/p should be: world
as "world" is not found in file 1. (2 Replies)
I know the basic difference between .pm and .pl files. But wat puzzles me is when to go for creating a module and when to create .pl files.Based on wat criteria we sholud decide to make a function whcih implements a common functionality as module or a .pl file ?? (3 Replies)
Hi All,
I need your help to find out the difference between 3 files.
How can i get the output which says that FILE2 contains additional (YYY,900,100) compare to FILE1 and FILE3 contains addition record (ZZZ,904,908) compare to FILE1?
I have tried using diff3 command, but was not able to get... (2 Replies)
I have two files like follows: -
File 1: -
A 20
B 15
D 10
C 6
File 2: -
B 21
A 20
C 11
D 10
Now I want file like this: -
It should pick up 'A' from File 1 and pick up 'A' from File 2 and should get difference of the numbers in 2nd column and display result as follows ... (2 Replies)
HI Folks,
sorry if it is a naive question.
i have two files . "file1.txt" & "file2.txt"
contents in files:
file1.txt file2.txt
-------- ---------
1 ... (2 Replies)
i have two files A and B and i want the difference to be printed in file C
as in example below
File A
10E32E7BCC5881DDB6||002878|1|1|
10E32E7BCC5881DDB7||002878|1|1|
10E32E7BCC5881DDB8||002878|1|1|
10E32E7BCC5881DDB9||002878|1|1|
File B
10E32E7BCC5881DDB1||002878|1|1|... (4 Replies)
I need the get the difference between 2 files and the result, I need to output it to an other file
file1
1
1
2
file2
1
1
2
3
Result....File3=3
used diff file1 file2 > file3 ( not working as expected)..Exact requirement..I have 2 flatfiles to compare and load only the difference in a... (0 Replies)
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
LEARN ABOUT HPUX
cmp
cmp(1) General Commands Manual cmp(1)NAME
cmp - compare two files
SYNOPSIS
file1 file2 [skip1 [skip2]]
DESCRIPTION
compares two files (if file1 or file2 is the standard input is used). Under default options, makes no comment if the files are the same;
if they differ, it announces the byte and line number at which the difference occurred. If one file is an initial subsequence of the
other, that fact is noted. skip1 and skip2 are initial byte offsets into file1 and file2, respectively; and maybe octal or decimal; the
form of the number is determined by the environment variable (in the C locale, a leading 0 denotes an octal number. See on environ(5) and
strtol(3C)).
recognizes the following options:
Print the byte number (decimal) and the differing bytes (octal)
for each difference (byte numbering begins at 1 rather than 0).
Print nothing for differing files; return codes only.
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed. If is not specified or is set to the empty string, a default of "C" (see lang(5))
is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are
set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
DIAGNOSTICS
returns the following exit values:
Files are identical.
Files are not identical.
Inaccessible or missing argument.
prints the following warning if the comparison succeeds till the end of file of file1(file2) is reached.
SEE ALSO
comm(1), diff(1).
STANDARDS CONFORMANCE cmp(1)