Hi all,
I am wondering if its possible to solve my problem with a simple code.
Basically I have a file that looks like this (tab delimited)
bob 8 250 tina 8 225
sam 8 225 ellen 9 315
kyle 9 275 sally 9 135
So what I want to do is match columns 2 and 5. If columns 2 and 5... (2 Replies)
Hi,
How to check if a string on file2 exactly matches with a part or complete string on file1, and return a match indicator based on some match rules.
1) only records on file1 with category A should be matched. for other category, the output match indicator should default to 'N'
2) on file2... (13 Replies)
I would like to join two files when two columns in each file matches with each other and then produce an output when taking multiple columns.
Like I have file A
1234,ABCD,23,JOHN,NJ,USA
2345,ABCD,24,SAM,NY,USA
5678,GHIJ,24,TOM,NY,USA
5678,WXYZ,27,MAT,NJ,USA
and file B
... (2 Replies)
Trying to match $2 in original_targets with $2 of new_targets . If the two numbers match exactly then a match.txt file is outputted using the information in the new_targets in the beginning 4 fields $1, $2, $3, $4 and value of $4 in the original_targets . If there is "No Match" then a no... (2 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Hello all, First post here. I did not notice a previous post to help me down the right path. I am looking to compare a column in a CSV file against another file (which is not a column match one for one) but more or less when a match is made, I would like to append a third column that contains a... (17 Replies)
Discussion started by: dis0wned
17 Replies
LEARN ABOUT OPENSOLARIS
join
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.
Tcljoin(1T)