Sponsored Content
Top Forums Shell Programming and Scripting AWK match $1 $2 pattern in file 1 to $1 $2 pattern in file2 Post 302562270 by Corona688 on Thursday 6th of October 2011 11:27:18 AM
Old 10-06-2011
I'm curious how that works.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

print contents of file2 for matching pattern in file1 - AWK

File1 row is same as column 2 in file 2. Also file 2 will either start with A, B or C. And 3rd column in file 2 is always F2. When column 2 of file 2 matches file1 column, print all those rows into a separate file. Here is an example. file 1: 100 103 104 108 file 2: ... (6 Replies)
Discussion started by: i.scientist
6 Replies

2. Shell Programming and Scripting

Use to awk to match pattern, and print the pattern

Hi, I know how to use awk to search some expressions like five consecutive numbers, , this is easy. However, how do I make awk print the pattern that is been matched? For example: input: usa,canada99292,japan222,france59664,egypt223 output:99292,59664 (6 Replies)
Discussion started by: grossgermany
6 Replies

3. Shell Programming and Scripting

AWK: Pattern match between 2 files, then compare a field in file1 as > or < field in file2

First, thanks for the help in previous posts... couldn't have gotten where I am now without it! So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following: If $1... (4 Replies)
Discussion started by: right_coaster
4 Replies

4. Shell Programming and Scripting

Awk to match a pattern and perform a search after the first pattern

Hello Guyz I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline ABC DEF LMN EFG HIJ LMN OPQ In the above text i need to... (8 Replies)
Discussion started by: RickCharles
8 Replies

5. UNIX for Dummies Questions & Answers

Match Pattern after certain pattern and Print words next to Pattern

Hi experts , im new to Unix,AWK ,and im just not able to get this right. I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Discussion started by: 100bees
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

Rearrange or replace only the second line after pattern match or pattern match

Im using the command below , but thats not the output that i want. it only prints the odd and even numbers. awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}' Im hoping for something like this file1: Text hi this is just a test text1 text2 text3 text4 text5 text6 Text hi... (2 Replies)
Discussion started by: invinzin21
2 Replies

8. Shell Programming and Scripting

awk to combine lines from line with pattern match to a line that ends in a pattern

I am trying to combine lines with these conditions: 1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text. 2. If condition1 is met then continue to combine lines through a line that ends with a semicolon. 3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies

9. Shell Programming and Scripting

awk command to get file content until 2 occurrence of pattern match

AWK command to get file content until 3 occurrence of pattern match, INPUT FILE: JMS_BODY_FIELD:JMSText = <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <custOptIn xmlns="http://com/walm/ta/cu/ccs/xml2"> <person>Romi</person> <appName>SAP</appName> </custOptIn> ... (4 Replies)
Discussion started by: prince1987
4 Replies

10. Shell Programming and Scripting

awk to update value based on pattern match in another file

In the awk, thanks you @RavinderSingh13, for the help in below, hopefully it is close as I am trying to update the value in $12 of the tab-delimeted file2 with the matching value in $1 of the space delimeted file1. I have added comments for each line as well. Thank you :). awk awk '$12 ==... (10 Replies)
Discussion started by: cmccabe
10 Replies
TFTOPL(1)						      General Commands Manual							 TFTOPL(1)

NAME
tftopl - convert TeX font metric (tfm) files to property lists SYNOPSIS
tftopl [OPTIONS] tfm_name[.tfm] [pl_name[.pl]] DESCRIPTION
This manual page is not meant to be exhaustive. The complete documentation for this version of TeX can be found in the info file or manual Web2C: A TeX implementation. The tftopl program translates a (program-oriented) font metric file to a (human-oriented) property list file. Thus, you can edit the con- tents of the TFM files, if the font designer has not done his or her job properly, or if you're encountering strange difficulties, or if you're just curious. It also serves as a TFM-file validating program, i.e., if no error messages are given, the input file is correct. The pl_name is extended with .pl if it lacks a suffix. If pl_name is not given, standard output is used. Likewise, tfm_name is extended with .tfm if it lacks a suffix. Also, path searching is done for the TFM file using the environment variable TEXFONTS. If that is not set, tftopl uses the system default. See tex(1) for the details of the searching. OPTIONS
-charcode-format=format The argument format specifies how character codes are output in the PL file. By default, only letters and digits are output using the C integer code (i.e., in ASCII); the others are output in octal. (Unless the font's coding scheme starts with TeX math sy or TeX math ex, in which case all character codes are output in octal.) If format is ascii, all character codes that correspond to graphic characters, besides the left and right parentheses, are output in ASCII. Finally, if format is octal, all character codes are output in octal. -verbose Without this option, tftopl operates silently. With it, a banner and progress report are printed on stdout. SEE ALSO
pltotf(1), Donald E. Knuth, TeX for nroffware. Donald E. Knuth, The Metafontbook (Volume C of Computers and Typesetting), Addison-Wesley, 1986, ISBN 0-201-13445-4. AUTHORS
Donald E. Knuth wrote the program. It was published as part of the TeX for nroffware technical report, available from the TeX Users Group. Howard Trickey and Pavel Curtis originally ported it to Unix. Web2C 2012 17 December 1994 TFTOPL(1)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy