01-27-2015
In addition to what anbu23 has already requested, please also tell us some more information:
- Are the input file field2 values always the same, or do the headings in the output file have to be determined from the input file?
- If the headings have to be determined from the input, do the headings have to be sorted alphabetically?
- Are all input records for a given Party_ID adjacent in your input files (as they are in your sample input)?
- Are Party_ID values all numeric?
- Does the output need to be sorted by Party_ID, or can the output be in the same order as your input data?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Discussion started by: Diya123
1 Replies
2. Shell Programming and Scripting
Hi,
I have a file in this format.
Name | organization
John | INT
Abby| DOM
John | DOM
John | MIX
Jason | INT
Anna | DOM
Abby |MIX
I want the output to look this.
Name | organization
John | INT, DOM, MIX
Abby | DOM, MIX
Jason | INT
Anna | DOM (5 Replies)
Discussion started by: sirrtuan
5 Replies
3. Shell Programming and Scripting
Hi,
I need an awk script (or whatever shell-construct) that would take data like below and get the max value of 3 column, when grouping by the 1st column.
clientname,day-of-month,max-users
-----------------------------------
client1,20120610,5
client2,20120610,2
client3,20120610,7... (3 Replies)
Discussion started by: ckmehta
3 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
Hi,
I am writing a code to basically pivot the data.
awk -v var1="" -v var2="" -v var3="" -v var4="" -v var5="" -v Disp=0\
'BEGIN {FS=":"; OFS="|";}\
/^Pattern1/ {var1=$2;Disp=0;} \
/^Pattern2/ {var2=$2;} \
/^Pattern3/ {var3=$2;} \
/^Pattern4/ {var4=$2;} \
/^Pattern5/... (5 Replies)
Discussion started by: tostay2003
5 Replies
6. Shell Programming and Scripting
Hello, I have a script extracting columns of useful numbers from a data file, and manipulating the numbers with awk commands. I have problems with my script...
1. There are two lines assigning numbers to $BaseForAveraging. If I use the commented line (the first one) and let the second one... (9 Replies)
Discussion started by: vgbraymond
9 Replies
7. Shell Programming and Scripting
Hi
My Input is like below
DELETE|MPI|AUD_UPD_AGENT|MPISYS
INSERT|MPI|AUD_UPD_AGENT|MPISYS
SELECT|MPI|AUD_UPD_AGENT|MPISYS
UPDATE|MPI|AUD_UPD_AGENT|MPISYS
DELETE|MPI|BDYMOD|MPISYS
INSERT|MPI|BDYMOD|MPISYS
SELECT|MPI|BDYMOD|MPISYS
UPDATE|MPI|BDYMOD|MPISYS
DELETE|MPI|BDYMOD_DESC|MPISYS... (4 Replies)
Discussion started by: dineshaila
4 Replies
8. Shell Programming and Scripting
Hi everyone,
Has anyone figured out yet how to do pivot table averages using AWK. I didn't see anything with regards to doing averages.
For example, suppose you have the following table with various individuals and their scores in round1 and round2:
SAMPLE SCORE1 SCORE2
British ... (6 Replies)
Discussion started by: Geneanalyst
6 Replies
9. Shell Programming and Scripting
Hi Experts,
Please bear with me, i need help
I am learning AWk and stuck up in one issue.
First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique.
Second point : For... (1 Reply)
Discussion started by: as7951
1 Replies
10. Shell Programming and Scripting
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2
Scenario 1
i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)
Discussion started by: as7951
1 Replies
GENERATELORE(1) GENERATELORE(1)
NAME
lore - convert documentations formats
SYNOPSIS
lore [-l linkrel] [-d docsdir] [-i input] [-o output] [--config attribute[=value] [...]] [-p] [file [...]]
lore --help
DESCRIPTION
The --help prints out a usage message to standard output.
-p, --plain
Use non-flashy progress bar - one file per line.
-n, --null
Do not report progress at all.
-N, --number
Add chapter/section numbers to section headings.
-l, --linkrel
Where non-document links should be relative to.
-d, --docsdir
Where to look for .html files if no files are given.
-e, --inputext <extension>
The extension that your Lore input files have (default: .xhtml)
-i, --input
Input format. New input formats can be dynamically registered. Lore itself comes with "lore" (the standard format), "mlore" (allows
LaTeX equations) and "man" (man page format). If the input format is not registered as a plugin, a module of the named input will be
searched. For example, --i twisted.lore.default is equivalent to using the default Lore input.
-o, --output
Output format. Available output formats depend on the input. For the core formats, lore and mlore support html, latex and lint,
while man allows lore.
-x, --index <filename>
The base filename you want to give your index file.
-b, --book <filename>
The book file to generate a book from.
--prefixurl <prefix>
The prefix to stick on to relative links; only useful when processing directories.
--version
Display version information and exit.
--config
Add input/output-specific information. HTML output allows for 'ext=<extension>', output allows for 'section' or 'chapter' in Lore,
and nothing in Math-Lore. Lore output allows for 'ext=<extension>'. Lint output allows nothing. Note that disallowed --config
options are merely ignored, and do not cause errors.
DESCRIPTION
If no files are given, all *.html documents in docsdir are processed.
AUTHOR
Written by Moshe Zadka
REPORTING BUGS
To report a bug, visit http://twistedmatrix.com/bugs/
COPYRIGHT
Copyright (C) 2003-2008 Twisted Matrix Laboratories.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
October 2002 GENERATELORE(1)