Sponsored Content
Top Forums Shell Programming and Scripting Match pattern from file 1 with any/all columns in file 2 Post 302962239 by disedorgue on Thursday 10th of December 2015 08:18:57 AM
Old 12-10-2015
Hi,
In file 1 or 2, can we find several times the same pattern ?
Can we load in memory file 1 or is it too large ?
Regards.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get columns from another file for match in col 2 in 1st file

Hi, My first file has 592155 9 rs16916098 1 592156 19 rs7249604 1 592157 4 rs885156 1 592158 5 rs350067 12nd file has 9 rs16916098 0 113228129 2 4 19 rs7249604 0 58709070 4 2 2 rs17042833 0 113558750 4 2... (2 Replies)
Discussion started by: genehunter
2 Replies

2. Shell Programming and Scripting

extracting columns using pattern file from source file

Hi experts,Please help me for the below requirement. i have a source file.(lets say contains 50 columns). I am extarcting five columns from the source file by using pattern file. for example input file:--------a,b,c,d,"a,g","v b",s,koutputfile=======a,"a,g","v b",s,kThanks in advance subhendu (2 Replies)
Discussion started by: subhendu81
2 Replies

3. Shell Programming and Scripting

AWK match $1 $2 pattern in file 1 to $1 $2 pattern in file2

Hi, I have 2 files that I have modified to basically match each other, however I want to determine what (if any) line in file 1 does not exist in file 2. I need to match column $1 and $2 as a single string in file1 to $1 and $2 in file2 as these two columns create a match. I'm stuck in an AWK... (9 Replies)
Discussion started by: right_coaster
9 Replies

4. Shell Programming and Scripting

Match and print columns in second file

Hi All, I have to match each row in file 1 with 1st row in file 2 and print the corresponding column from file2. I am trying to use an awk script to do this. For example cat File1 X1 X3 X4 cat File2 ID X1 X2 X3 X4 A 1 6 2 1 B 2 7 3 3 C 3 8 4 1 D 4 9 1 1 (3 Replies)
Discussion started by: newpro
3 Replies

5. Shell Programming and Scripting

Pattern match till the end of the file.

I have a file which is like this ……………………………………….. ………………………………… ………………………………… …………………………………… ……………………………………. ……………………………… <<<from_here>>> ……………………………… ………………………………. I want a script which would fetch the data starting from <<<from_here>>> in the file till the end... (2 Replies)
Discussion started by: halfafringe
2 Replies

6. Shell Programming and Scripting

awk Pattern Match One File to Another

I want to read from file 1 and pattern match in file two and print field two from the next line. File 1: user1 user2 user3 File 2: name=user1 gud=12345 name=user2 gud=32456 I have this pattern hardcoded but can't work out how to pass file 1 to the pattern match: (6 Replies)
Discussion started by: u20sr
6 Replies

7. Shell Programming and Scripting

Help with ksh-to read ip file & append lines to another file based on pattern match

Hi, I need help with this- input.txt : L B white X Y white A B brown M Y black Read this input file and if 3rd column is "white", then add specific lines to another file insert.txt. If 3rd column is brown, add different set of lines to insert.txt, and so on. For example, the given... (6 Replies)
Discussion started by: prashob123
6 Replies

8. Shell Programming and Scripting

awk pattern match not printing desired columns

Hi all, I'm trying to match the following two files with the code below: awk -F, 'NR==FNR {a=$0; next} ($12,$4) in a {print $12,$1,a}' OFS="," file4.csv file3.csv but the code does not print the entire row from file4 in addition to column 12 and 1 of file3. file4: o,c,q,co,ov,b... (1 Reply)
Discussion started by: bkane3
1 Replies

9. Shell Programming and Scripting

Match Columns in one file and extract columns from another file

Kindly help merging information from two files with the following data structure. I want to match for the CHR-SNP in Foo and get the columns that match from CHROM-rsID Fields 1 & 2 of foo may have duplicates, however, a joint key of Fields $1$2$3$4 is unique. Also would be helpful to clean up... (4 Replies)
Discussion started by: genehunter
4 Replies

10. UNIX for Beginners Questions & Answers

Match pattern only between certain lines in entire file

Hello, I have input that looks like this: * 0 -1 103 0 0 m. 7 LineNr 23 ClauseNr 1: 1: 1: 304: 0 0 SentenceNr 13 TxtType: Q Pargr: 2.1 ClType:MSyn PS004,006 ZBX= 0 1 1 0 7 -1 -1 3 2 3 2 -1 1 1 -1 -1 -1 -1 0 501 0 PS004,006 ZBX ... (2 Replies)
Discussion started by: jvoot
2 Replies
XVIER(6)							   Games Manual 							  XVIER(6)

NAME
xvier - a X11 board game. SYNOPSIS
xvier [ -display displayname ] [ -geometry geometry ] [ -fn fontpattern ] [ -iconic ] [ -rows rows ] [ -columns columns ] [ -prog program- path ] [ -level levelnumber ] DESCRIPTION
Xvier is a board game where you and the computer alternately throw stones into free columns. The stones pile up in the columns, and the goal is to get four stones in a row, in a column or diagonally. You can choose various board sizes and levels of difficulty. During the game you click with the mouse onto the column where you want to put your stone. Another possibility is a lower case letter in the range 'a' to 'm' (maximally) where 'a' is the left column. If you want to change the level of difficulty, you must use the keyboard. Simply type the number of the desired level. These levels correspond to the search depth of the game program. The meaning of the command line options and buttons is given below. While the game program computes a move, everything besides Change and Quit is blocked. OPTIONS
-display displayname The X11 screen you want to use. -geometry geometry The desired geometry of the game window. -fn fontpattern A pattern describing the fonts which are used for the buttons and messages. Xvier chooses the biggest font that fits into the win- dow. Therefore the pattern should describe different sizes of one font. The default is *-Helvetica-Medium-R-Normal-*. -iconic Start in iconic state. -rows rows The number of rows of the board. The possible range is 4 to 13. The default is 6. -columns columns The number of columns of the board. The possible range is 4 to 13. The default is 7. -prog programpath The path of the game program. -level levelnumber The level of difficulty to start with. The possible range is 0 to 9. The default is 0. BUTTONS
The keyboard equivalents of the buttons are given in brackets. Quit ['q' or 'Q'] Finish the game. New ['n' or 'N'] Start a new game. Undo ['u' or 'U'] Undo one move. Start ['s' or 'S'] Let the computer begin with the first move. The board must be empty. Change ['C'] Exchange the colours of your and the computer's stones. AUTHOR
Norbert Jung jung@dia.informatik.uni-stuttgart.de 21 April 1992 XVIER(6)
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy