10-27-2010
Could you still show your desired output based on the input files above?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have to compare two text files, very few of the lines in these files will have some difference in some column.
The files size is in GB.
Sample lines are as below:
11111122222222333333aaaaaaaaaabbbbbbbbbccccccccdddddd
11111122222222333333aaaaaaaaaabbbbbbbbbccccccccddeddd
So assuming these... (19 Replies)
Discussion started by: net_shree
19 Replies
2. Shell Programming and Scripting
Hi All,
I need some help in script or awk to create a textfile.
I have a directory where two subdirectories exists say A and B.
Now I need to write a ".txt" file with well arranged(space wraped) three columns in it with the data as follows:
1st column:Serial number(which will increment... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies
3. Shell Programming and Scripting
hi
I have 2 files to comapre ,in file a sible column it is numbers,in file b2 numbers and other values with coma separated.
i want compare numbers in file a with file b,and the out put put should be in C with numbers in both file a and b along with other columns of file b.
i used folowing... (7 Replies)
Discussion started by: satish.res
7 Replies
4. Shell Programming and Scripting
I have two text files which have records of thousand rows. Each row is having around 40 columns. Each column is tab delimited. Each row is delimited by newline character.
My requirement is to find for each row i need to find whether any column is different between the two files. For each row i... (8 Replies)
Discussion started by: uihnybgte
8 Replies
5. Shell Programming and Scripting
Hi i have 2 csv files a.csv and b.csv with the same number of columns and a list of values in both of it. Each and every individual value in both the files need to compared and if it matches then print correct in a new csv file otherwise print Incorrect
eg
a.csv
1,12/27/2007,Reward,$10.00... (5 Replies)
Discussion started by: naveenn08
5 Replies
6. Shell Programming and Scripting
now i have a different file zoo.txt with content
123|zoo
234|natan
456|don
and file rick.txt with contents
123|dog|pie|pep
123|tail|see|newt
456|som|sin|sim
234|pay|rat|cat
i want to look for lines in file zoo.txt column1 that has same corresponding lines in column 1 of... (6 Replies)
Discussion started by: dealerso
6 Replies
7. Shell Programming and Scripting
Hi,
I have fileA.txt like this.
B01B02 D0011718
B01B03 D0012540
B01B04 D0006145
B01B05 D0004815
B01B06 D0012069
B01B07 D0004064
B01B08 D0011988
B01B09 D0012071
B01B10 D0005596
B01B11 D0011351
B01B12 D0004814
B01C01 D0011804
I want to compare this against another file (fileB.txt)... (3 Replies)
Discussion started by: genehunter
3 Replies
8. Shell Programming and Scripting
HI,
I have two files and contains many Fields with | (pipe) delimitor, wanted to compare both the files and get only unmatched perticular fields. this i wanted to use in shell scriting.
ex:
first.txt
111 |abc| 230| hbc231 |bbb |210 |bbd405 |ghc |555 |cgv
second.txt
111 |abc |230 |hbc231... (1 Reply)
Discussion started by: prawinmca
1 Replies
9. Shell Programming and Scripting
I am trying to perform linear interpolation on three columns in a CSV file.
When I run this code, I do not get any changes in the output (see Expected Output).
What am I doing wrong here?
Awk Code
'
function interpolate(lat1, lon1, t1, lat2, lon2, t2, i) {
for (i = 1; i... (2 Replies)
Discussion started by: hrrruser
2 Replies
10. Programming
Hi,
Below is the format of a report generated by a custom reporting solution. I opened the report in Notepad++ and junked data and values as in the image below.
https://www.unix.com/attachment.php?attachmentid=7907&stc=1&d=1575507708
I want to convert the values to a PIPE delimited format as... (2 Replies)
Discussion started by: ramkrix
2 Replies
CMP(1) BSD General Commands Manual CMP(1)
NAME
cmp -- compare two files
SYNOPSIS
cmp [-l | -s | -x] [-hz] file1 file2 [skip1 [skip2]]
DESCRIPTION
The cmp utility compares two files of any type and writes the results to the standard output. By default, cmp is silent if the files are the
same; if they differ, the byte and line number at which the first difference occurred is reported.
Bytes and lines are numbered beginning with one.
The following options are available:
-h Do not follow symbolic links.
-l Print the byte number (decimal) and the differing byte values (octal) for each difference.
-s Print nothing for differing files; return exit status only.
-x Like -l but prints in hexadecimal and using zero as index for the first byte in the files.
-z For regular files compare file sizes first, and fail the comparison if they are not equal.
The optional arguments skip1 and skip2 are the byte offsets from the beginning of file1 and file2, respectively, where the comparison will
begin. The offset is decimal by default, but may be expressed as a hexadecimal or octal value by preceding it with a leading ``0x'' or
``0''.
EXIT STATUS
The cmp utility exits with one of the following values:
0 The files are identical.
1 The files are different; this includes the case where one file is identical to the first part of the other. In the latter case, if the
-s option has not been specified, cmp writes to standard error that EOF was reached in the shorter file (before any differences were
found).
>1 An error occurred.
SEE ALSO
diff(1), diff3(1)
STANDARDS
The cmp utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. The -h, -x, and -z options are extensions to the standard.
HISTORY
A cmp command appeared in Version 1 AT&T UNIX.
BSD
November 18, 2013 BSD