Do you only want to find lines that are in file1 that are not in file2, or do you also want to find lines that are in file2 that are not in file1?
---------- Post updated at 04:42 PM ---------- Previous update was at 04:00 PM ----------
If you can't perform a select as Scott suggested, there are at least a couple of fairly straight-forward ways of handling this. The easiest may well be the best:
although with 15,000,000 lines you may have to read the man page for your sort utility to find out how to specify a file system with enough space for the temporary files that will be required.
Another way would be to create an associative array in awk of the entries found in File2 and then read the entries in File1 and report entries that aren't in the array you built while reading File2. (If you need the entries in File2 that aren't in File1 as well, you could mark or delete the entries you found on the first pass and make another pass to print the entries that weren't matched.)
Hi
I want to archive the following all the files and directory like listed below:
$ ls -a
. .. .bash_history .bash_logout .bash_profile .bashrc .emacs .mysql_history public_html .viminfo
What I tried is to use the following command
$ gtar cvzf allmyfiles.tar.gz *
... (1 Reply)
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)
Hi there,
in near future I have to change my work surrounding from HP UNIX to Windows Vista (great to get rid of old hardware :), but bad to loose UNIX :( ). As I heavily use KSH scripts to do my job, I was wondering, if there is any HowTo available, supporting me in re-writing the scripts to... (4 Replies)
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)
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)
Morning all
I hope I have put this in the correct forum.
I have a requirement to monitor a directory on a server for files being sftp'ed in and then to sftp them of to another server. The issues I have though of are making sure the files have completely transferred onto the server before they... (6 Replies)
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)
HI All,
I am new to Unix shell scripts..
Could you please post the unix shell script for for the below request.,
There are two different tables(sample1, sample2) in different schemas(s_schema1, s_schema2).
Unix shell script to compare the columns of two different tables of two... (2 Replies)