This is the mail archive of the
mailing list for the cygwin project.
RE: paste & join
- From: "Buchbinder, Barry (NIH/NIAID)" <BBuchbinder at niaid dot nih dot gov>
- To: 'The Cygwin-Talk Malingering List' <cygwin-talk at cygwin dot com>
- Date: Thu, 9 Jun 2005 08:18:29 -0400
- Subject: RE: paste & join
- Reply-to: The Cygwin-Talk Malingering List <cygwin-talk at cygwin dot com>
At Thursday, June 09, 2005 6:18 AM, zzapper wrote:
> 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 ###
> 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!