This is the mail archive of the cygwin-talk@cygwin.com mailing list for the cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: paste & join


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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]