From owner-freebsd-questions@FreeBSD.ORG Thu Dec 9 20:51:44 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB5F516A4CE for ; Thu, 9 Dec 2004 20:51:44 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E1AE43D5C for ; Thu, 9 Dec 2004 20:51:44 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id iB9Kpgw17177; Thu, 9 Dec 2004 15:51:42 -0500 (EST) From: Jerry McAllister Message-Id: <200412092051.iB9Kpgw17177@clunix.cl.msu.edu> To: jthiyaga@kmart.com (Thiyagarajan, Jemima) Date: Thu, 9 Dec 2004 15:51:42 -0500 (EST) In-Reply-To: from "Thiyagarajan, Jemima" at Dec 09, 2004 03:39:20 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org cc: jemydpm@yahoo.co.in Subject: Re: comparing two files yy.unl and xx.dat X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 20:51:45 -0000 > > Hi all > > I am new to shell scripts. I have a doubt. Please somebody help me. > > Any explanation with example will be appreciated. > > I try to compare 2 files xx.dat (data separated by comma) and yy.unl > (data separated by |). > > And if a record in xx.dat is not found in yy.unl then move that record > to some database table like db2 table. Well, I would be inclined to write a small Perl script for that. If they both had the same separators there might be an easier way. Of course, I suppose it would be easy to convert the commas to bars or viceversa with sed and then work on it. But Perl is so easy it would be my choice. ////jerry > > > > Thanks > > > > Jemima > > > > >