Sponsored Content
Top Forums Shell Programming and Scripting Question on awk for finding the column number using a match word Post 302451137 by mallak on Sunday 5th of September 2010 10:57:19 PM
Old 09-05-2010
Thanks a lot

So i understood that using above code awk will scan each line and will return values 1 and 2

Code:
asnapply 1 2 3 apply_server=1 apply_schema=ASN
asnapply 1 2 3 apply_server=2 apply_schema=ASN

Thanks once again for the reply

Last edited by Scott; 09-10-2010 at 01:55 PM.. Reason: Added code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

finding the number of occurence of a word in a line

suppose i have this line abs|der|gt|dftnrk|dtre i want to count the number of "|" in this line.. how can i do that. plz help:confused: (9 Replies)
Discussion started by: priyanka3006
9 Replies

2. Shell Programming and Scripting

Finding multiple column values and match in a fixed length file

Hi, I have a fixed length file where I need to verify the values of 3 different fields, where each field will have a different value. How can I do that in a single step. (6 Replies)
Discussion started by: naveen_sangam
6 Replies

3. UNIX for Dummies Questions & Answers

AWK lookup not finding match

Hello everyone, I have been struggling with the following situation, I think I am doing something wrong, can anyone help? I have 2 comma separated files, the first is a look-up table that will supply the phone number based on the customer id, the second is a file containing customers and their... (4 Replies)
Discussion started by: gio001
4 Replies

4. Shell Programming and Scripting

Awk or Sed, fubd match in column, then edit column.

FILE A: 9780743551526,(Abridged) 9780743551779,(Unabridged) 9780743582469,(Abridged) 9780743582483,(Unabridged) 9780743563468,(Abridged) 9780743563475,(Unabridged) FILE B: c3saCandyland 9780743518321 "CANDYLAND" "MCBAIN, ED" 2001 c3sbCandyland 9780743518321 ... (7 Replies)
Discussion started by: glev2005
7 Replies

5. Shell Programming and Scripting

finding number in exact column

Dear all, I want to find a number in exact column but I don't know how to do it. Here is the thing, data is shown below, and I want to find 416 in the first column and print it out, how should I deal with it? Thank you very much! ab33 50S01S 958 279.068999 67.251013 -150.172544 67.250000... (5 Replies)
Discussion started by: handsonzhao
5 Replies

6. Shell Programming and Scripting

Finding log files that match number pattern

I have logs files which are generated each day depending on how many processes are running. Some days it could spin up 30 processes. Other days it could spin up 50. The log files all have the same pattern with the number being the different factor. e.g. LOG_FILE_1.log LOG_FILE_2.log etc etc ... (2 Replies)
Discussion started by: atelford
2 Replies

7. Shell Programming and Scripting

awk match whole word using a variable

Hello, I am writing a script in awk where I need to match a whole word that is stored inside a variable. For example: I am working on a text that looks like this, and I want to print the second row: sfasfsomethingsfasf this is something I can use this is not somethingIcanuse ... (12 Replies)
Discussion started by: avi.levi
12 Replies

8. Shell Programming and Scripting

awk Print New Column For Every Two Lines and Match On Multiple Column Values to print another column

Hi, My input files is like this axis1 0 1 10 axis2 0 1 5 axis1 1 2 -4 axis2 2 3 -3 axis1 3 4 5 axis2 3 4 -1 axis1 4 5 -6 axis2 4 5 1 Now, these are my following tasks 1. Print a first column for every two rows that has the same value followed by a string. 2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

9. Shell Programming and Scripting

Finding a word with awk or sed

Hello, in a AIX system : AIX CDRATE01 2 7 00FAB3114C00 my following commande give the result : LISTE /tmp/RESS **************************************************************** Liste TYPE = XXXXXXX EX = YYYY VER ... (13 Replies)
Discussion started by: sam01
13 Replies

10. UNIX for Beginners Questions & Answers

How to search for a word in column header that fully matches the word not partially in awk?

I have a multicolumn text file with header in the first row like this The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach for ii in ${hdr} do gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
PTBL(1) 						      General Commands Manual							   PTBL(1)

NAME
ptbl - print a type table SYNOPSIS
ptbl [-a] <tbl-file> DESCRIPTION
ptbl prints the give type table to stdout. It will print it in one of two formats: internal style and ASN.1 stlye. The internal style shows the contents of the type table data structure in ASN.1 value notation. You will need to look at the tbl.asn1 file to understand the internal form. The ASN.1 form attempts to re-create the ASN.1 that generated the given type table. OPTIONS
-a Print the table in ASN.1 style (recommended) FILES
snacc/tbl-tools/ptbl/ Source code for the ptbl program snacc/asn1specs/tbl.asn1 ASN.1 definition for the type table data structure BUGS
ptbl does not attempt to print the IMPORTs information even though it is possible with a bit of work. COPYING
Copyright (c) 1993 Mike Sample and the University of British Columbia Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. AUTHOR
Mike Sample <msample@cs.ubc.ca>, University of British Columbia ACKNOWLEDGEMENTS
This work was made possible by grants from the Canadian Institute for Telecommunications Research (CITR) and Natural Sciences and Engineer- ing Research Council of Canada (NSERC). 11 July 1993 PTBL(1)
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy