10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this code
awk 'NR==FNR{a=$1;next} a' file1 file2
which does what I need it to do, but for only two files. I want to make it so that I can have multiple files (for example 30) and the code will return only the items that are in every single one of those files and ignore the ones... (7 Replies)
Discussion started by: castrojc
7 Replies
2. Shell Programming and Scripting
Team,
I have two files and I am trying to find the lines unique to file1. So i have executed the below command at shell prompt and got the correct results
comm -23 <(sort test) <(sort test1)
When i run the same command in Bash shell script, i got the correct results.
But when i run... (5 Replies)
Discussion started by: forums123456
5 Replies
3. Shell Programming and Scripting
I'm looking to compare two delimited files:
file1
one|xxx
two|xxx
three|xxx
file2
four|xxx
five|xxx
six|xxx
one|yyy
Where the result is the the file2 row whose first field does NOT appear in file1. I.e., the correct result would be:
result
four|xxx (3 Replies)
Discussion started by: tiggyboo
3 Replies
4. Shell Programming and Scripting
I have four files, I need to compare these files together.
As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes.
Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies
5. Shell Programming and Scripting
Hi, all:
I've got two folders, say, "folder1" and "folder2".
Under each, there are thousands of files.
It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command.
However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies
6. Shell Programming and Scripting
Hiiiii friends
I have 2 files which contains huge data & few lines of it are as shown below
File1: b.dat(which has 21 columns)
SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL
ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies
7. Shell Programming and Scripting
I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together.
I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
Discussion started by: bkeep
4 Replies
8. Shell Programming and Scripting
I have two files and need to compare the two files and to remove the matching lines from both the files (4 Replies)
Discussion started by: shellscripter
4 Replies
9. UNIX for Dummies Questions & Answers
I need to find deleted records from a file. I compare yesterdays file.old to todays file.new. I need to find the records that were in yesterdays file that are not in todays. My file is fixed field. If I run a "comm -23" obviously what i find is not necesarilly a delete, it could be a change.
... (0 Replies)
Discussion started by: eja
0 Replies
10. Shell Programming and Scripting
I an unix newbie and am confused about the working of "comm".
I have two files to be compared and the three columns of output after comparison should be stored a three separate files.
File abc
--------
pink
orange
green
blue
black
maroon
File xyz
---------
pink
yellow
grey... (3 Replies)
Discussion started by: manthasirisha
3 Replies