Question on awk for finding the column number using a match word
Hi Guys,
Please help me out in my situation of writing a shell script
Exampl:I have a output like
Now i need output like
I tried awk but hardcoded and printed but i have a question instead of hardcoding the column number,how can i get the column number matching apply_server from input and print apply_server=1
Any help appreciated
Thanks
Last edited by Scott; 09-08-2010 at 07:12 PM..
Reason: Please use code tags
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
asntool
ASNTOOL(1) NCBI Tools User's Manual ASNTOOL(1)NAME
asntool - process ASN.1 module specifications
SYNOPSIS
asntool [-] [-B filename] [-D N] [-G] [-I str] [-J type] [-K str] [-L str] [-M filename,...] [-P str] [-Q] [-S filename] [-T filename] [-V]
[-X filename] [-Z] [-b N] [-d filename] [-e filename] [-f filename] [-l filename] -m filename [-o filename] [-p filename] [-t str]
[-v filename] [-w N] [-x filename]
DESCRIPTION
asntool reads, validates, and displays ASN.1 module specifications.
OPTIONS
A summary of options is included below.
- Print usage message
-B filename
Generate objects and code in files named filename.*
-D N Debugging level for code generation:
0 No debugging (default)
1 Shallow debugging
2 Deep debugging
3-9 Same as 2
-G Generate object loader .c and .h files
-I str Put "#include str" in generated .c file
-J type
Register type type with object manager
-K str In generated .c, force name of #included asn header to str
-L str Label registered type as str
-M filename,...
Search the ASN.1 modules in filename,... for external references
-P str XML module prefix for DOCTYPE
-Q Use quoted syntax form for generated include files
-S filename
Send debugging output to filename rather than stderr
-T filename
Dump ASN.1 tree to filename
-V Force CHOICE objects to use custom structures rather than ValNodePtrs, for compatibility with some old hand-coded object loaders.
-X filename
Write XML DTD to filename. If filename is "m", print each module to a separate file.
-Z Bit twiddle for optional zero value base slots
-b N Use N-byte buffers (default = 1024; anything between 512 and 10000 is legal)
-d filename
Read binary values from filename (requires -t)
-e filename
Write binary values to filename
-f filename
Write ASN.1 module to filename
-l filename
Write ASN.1 loader to filename
-m filename
Read ASN.1 module from filename
-o filename
Write header to filename
-p filename
Write print values to filename
-t str Expect binary values to have type str
-v filename
Read print values from filename
-w N Limit values in #defines to N bits (default = 31; anything between 31 and 128 is legal)
-x filename
Write XML data to filename
AUTHOR
The National Center for Biotechnology Information.
NCBI 2010-09-01 ASNTOOL(1)