10-21-06 06:27 AM
On 2006-10-21, tester wrote:
> Hi Gurus,
> i am looking for script wherein compare two files and generate a third
> file which has output from one file which is not present on other.
>
> e.g. file1 and file2 -> file3
>
> file3 should have all the contents form file1 which is not there in
> file2.
>
> I did sorted file1 and file2 and ran comm -3 file1 file2 > file3 but
> it doesn't contain the output lokking for.
comm -13 file1 file2 > file3
comm -23 file1 file2 > file3
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
[ Post a follow-up to this message ]
|