Sponsored Content
Top Forums Shell Programming and Scripting Venn diagram results using awk Post 302672551 by alister on Monday 16th of July 2012 01:59:47 PM
Old 07-16-2012
If your real data is, like your sample data, sorted on the first field (the join field):
Code:
join f1 f2 > f12
join f1 f3 > f13
join f2 f3 > f23
join f12 f3 > f123

Running join that many times may seem unappealing, but if each file has something on the order of 1000 records (and not a million), performance probably won't be an issue.

Regards,
Alister
These 2 Users Gave Thanks to alister For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Process diagram for 50+ unix scripts

Can someone point me to a good book for drawing a process diagram for 50+ unix scripts? The scripts run at different frequencies, and do everything from putting and getting data via FTP, to database I/O, to checking disk space ... etc. (0 Replies)
Discussion started by: tomstone_98
0 Replies

2. Shell Programming and Scripting

Wierd results with awk

Hey, I'm trying to use awk for some simple file manipulations but i'm getting soem wierd results. So i want to open up a file which looks like this: @relation 'autoMpg' @attribute a numeric @attribute b numeric @attribute c numeric @data -1.170815,0.257522,0.016416... (2 Replies)
Discussion started by: amatheny
2 Replies

3. Shell Programming and Scripting

need a little help with results from awk

Hi there all, I am using a line to get some replys from my PS I do ps -ef |awk '{printf $9}' But my result is 1 big line. No spaces between the lines or someting for example:... (2 Replies)
Discussion started by: draco
2 Replies

4. Shell Programming and Scripting

Output of AWK Results

In the following line The AWK statement parses through a listing for files and outputs the results using the {print} command to the screen. Is there a way to (a) send the output to a file and (b) actually perform a cp cmd to copy the listed files to another directory? ls | awk -va=$a -vb=$b... (1 Reply)
Discussion started by: rdburg
1 Replies

5. Shell Programming and Scripting

Loop through awk results

I have files structured in stanzas, whose title is '', and the rest couples of 'id: value'. I need to find text within the title and return the whole stanzas that match the title. The following works: awk 'BEGIN{RS="";IGNORECASE=1}/^\/' myfileI would need to count all of the occurences, though,... (7 Replies)
Discussion started by: hermes14
7 Replies

6. Hardware

hardware diagram / database

Hi - we are looking for a (hopefully free/opensource) solution for diagramming our rack/hardware configuration. the rack solution seems easier to find than the hardware piece. i.e. on our IBM 770 with two CEC's, a method of noting what hardware points to what... for example, on the primary CEC,... (0 Replies)
Discussion started by: TinWalrus
0 Replies

7. Shell Programming and Scripting

Substitute from awk results

Hi, The following awk command : asmcmd lsdg | awk '{print $13;}' | grep -i ${SID} return the following output . An Empty line + two lines contain "/" at the end of the line INDEVDATA/ INDEVFRA/ I need to remove the "/" as well as the empty line. Please advise Thanks (3 Replies)
Discussion started by: Yoav
3 Replies

8. Emergency UNIX and Linux Support

Venn Data Maker

Hi, My input is like this head input.txt Set1,Set2,Set3 g1,g2,g3 g2,g1,g3, g4,g5,g5 g1,g1,g1, g2,g1,g1, g6,g7,g8 ,g7,g8 ,,g8 My output file should be Name,Set1,Set2,Set3 g1,1,1,1 (18 Replies)
Discussion started by: jacobs.smith
18 Replies
join(1T)						       Tcl Built-In Commands							  join(1T)

__________________________________________________________________________________________________________________________________________________

NAME
join - Create a string by joining together list elements SYNOPSIS
join list ?joinString? _________________________________________________________________ DESCRIPTION
The list argument must be a valid Tcl list. This command returns the string formed by joining all of the elements of list together with joinString separating each adjacent pair of elements. The joinString argument defaults to a space character. EXAMPLES
Making a comma-separated list: set data {1 2 3 4 5} join $data ", " => 1, 2, 3, 4, 5 Using join to flatten a list by a single level: set data {1 {2 3} 4 {5 {6 7} 8}} join $data => 1 2 3 4 5 {6 7} 8 SEE ALSO
list(1T), lappend(1T), split(1T) KEYWORDS
element, join, list, separator ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl join(1T)
All times are GMT -4. The time now is 03:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy