From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19355 invoked by alias); 9 Jun 2005 12:18:37 -0000 Mailing-List: contact cygwin-talk-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: cygwin-talk-owner@cygwin.com Reply-To: The Cygwin-Talk Malingering List Received: (qmail 19335 invoked by uid 22791); 9 Jun 2005 12:18:33 -0000 Received: from nihhubims.hub.nih.gov (HELO NIHHUBIMS.hub.nih.gov) (128.231.90.111) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 09 Jun 2005 12:18:33 +0000 Received: by nihhubims.hub.nih.gov with Internet Mail Service (5.5.2658.27) id ; Thu, 9 Jun 2005 08:18:31 -0400 Message-ID: From: "Buchbinder, Barry (NIH/NIAID)" To: 'The Cygwin-Talk Malingering List' Subject: RE: paste & join Date: Thu, 09 Jun 2005 15:53:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2005-q2/txt/msg00389.txt.bz2 At Thursday, June 09, 2005 6:18 AM, zzapper wrote: > Hi, > I've used paste for years and it's super useful. > > Basically it "vertically pastes" two text files together > > Can't get my head around join tho, when and where would you use this? > > ### this is a Hippo Free Zone ### > -- > zzapper > vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?" > http://www.rayninfo.co.uk/tips/ vim, zsh & success tips join basically allows one to combine lines from 2 files that have common fields when the data in those fields are identical (or, optionally, missing). In other words, it allows one to treat two flat files like they were in a relational database. I've also use it as a replacement from grep -f pattern_file, when there are a lot of patterns to search for; I've the impression that it is faster when there are a lot of patterns in pattern_file (because the input files are sorted on the join field, join does not have to check all the patterns in pattern_file. But in contrast, though I occasionally think about how I use it, I've never found a use for paste. Different strokes for different folks!